18.104.22.168 The fread function
size_t fread(void *ptr, size_t size, size_t nmemb,
The fread function reads, into the array pointed to by ptr , up to
nmemb members whose size is specified by size , from the stream
pointed to by stream . The file position indicator for the stream (if
defined) is advanced by the number of characters successfully read.
If an error occurs, the resulting value of the file position indicator
for the stream is indeterminate. If a partial member is read, its
value is indeterminate.
The fread function returns the number of members successfully read,
which may be less than nmemb if a read error or end-of-file is
encountered. If size or nmemb is zero, fread returns zero and the
contents of the array and the state of the stream remain unchanged.