fread

Reads from a file.

size_t fread (char * buffer, size_t size, size_t count, FILE * stream);

Required Header
<stdio.h>

Return Value

This function returns the number of bytes read.

Parameters

buffer

  The destination buffer to read into

size

  The size of an item in bytes

count

  The number of items

stream

  A pointer to the open FILE structure

Remarks

The fread function read up to size items from stream, which may be less than requested if an error occurs or the End Of File is encountered.

Stream I/O Routines

See Also    fwrite, _read