libc.info: fread

Go forward to freopen
Go backward to fputs
Go up to Stdio
Go to the top op libc

`fread'--read array elements from a file

*Synopsis*
     #include <stdio.h>
     size_t fread(void *BUF, size_t SIZE, size_t COUNT,
         FILE *FP);
   *Description*
`fread' attempts to copy, from the file or stream identified by FP,
COUNT elements (each of size SIZE) into memory, starting at BUF.
`fread' may copy fewer elements than COUNT if an error, or end of file,
intervenes.
   `fread' also advances the file position indicator (if any) for FP by
the number of _characters_ actually read.
*Returns*
The result of `fread' is the number of elements it succeeded in reading.
*Portability*
ANSI C requires `fread'.
   Supporting OS subroutines required: `close', `fstat', `isatty',
`lseek', `read', `sbrk', `write'.