|
||
size_t fread( void *buf, size_t size, size_t n, FILE *stream )
void *buf; /* address of data buffer */ size_t size; /* size of each buffer element */ size_t n; /* number of buffer elements */ FILE *stream; /* input stream */
|
|
|
Synopsis |
#include "stdio.h"
The fread function reads n objects, each of size size bytes from the file associated with fp , and stores them in the buffer pointed to by buf .
|
|
Parameters |
buf is the address of the buffer to receive the data, and should be at least size * n bytes in length. size and n are integers. stream is a stream pointer, open for input.
|
|
Return Value |
fread returns the actual number of objects read, which will be less than or equal to n .
|
|
See Also |
|
|
|
|