Copyright (c) 1990 The Regents of the University of California.
All rights reserved.
This code is derived from software contributed to Berkeley by
Chris Torek.
%sccs.include.redist.man%
@(#)fread.3 6.3 (Berkeley) 01/20/91
All rights reserved.
This code is derived from software contributed to Berkeley by
Chris Torek.
%sccs.include.redist.man%
@(#)fread.3 6.3 (Berkeley) 01/20/91
FREAD 3 ""
C 7 NAME
fread, fwrite - stream binary input/output
SYNOPSIS
#include <stdio.h> int fread(void *ptr, size_t size, size_t count, FILE *stream); int fwrite(void *ptr, size_t size, size_t count, FILE *stream);
DESCRIPTION
Fread reads
count items of data, each
size bytes long, from the given input
stream , storing them at the location given by
ptr . It returns the actual count of items read
(which will be less than
count in the event of an
EOF or error).
Fwrite writes count items of data, each size bytes long, to the given output stream , obtaining them from the location given by ptr . It returns the actual count of items written.
"RETURN VALUE"
These functions return 0 (or a short count) upon end of file or error.
"SEE ALSO"
read(2), write(2), fopen(3), getc(3), putc(3), stdio(3)