Return Values
fread returns the number of full items actually read, which may be less than count if an error occurs or if the end of the file is encountered before reaching count.
Use the feof or ferror function to distinguish a read error from an end-of-file condition.
If size or count is 0, fread returns 0 and the buffer contents are unchanged.