Function fread

Top 

Declaration:

int fread(void s[], int size, int n, unsigned long stream);

Description

Reads data from a stream.

fread reads n items of data of size bytes long each from the given input stream into the block pointed to by s. The total amount of bytes read is (n * size).

Returned Value

On success fread returns the number of items (not bytes) actually read. On end-of-file or error it returns a short count (possibly 0).