COHERENT manpages

This page displays the COHERENT manpage for fread() [Read data from file stream].

List of available manpages
Index


fread() -- STDIO Function (libc)

Read data from file stream
#include <stdio.h>
int fread(buffer, size, n, fp)
char *buffer; unsigned size, n; FILE *fp;

fread() reads n items, each being size bytes long, from file stream fp into
buffer.

Example

For an example of how to use this function, see the entry for fopen().

See Also

fwrite(),
libc
ANSI Standard, §7.9.8.1
POSIX Standard, §8.1

Diagnostics

fread() returns  zero upon reading  EOF or on error;  otherwise, it returns
the number of items read.