Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
fread(3)
Edit
PageHistory
Diff
Info
LikePages
FREAD !!!FREAD NAME SYNOPSIS DESCRIPTION RETURN VALUE CONFORMING TO SEE ALSO ---- !!NAME fread, fwrite - binary stream input/output !!SYNOPSIS __#include __ __size_t fread( void *__''ptr''__, size_t__ ''size''__, size_t__ ''nmemb''__, FILE *__''stream''__);__ __size_t fwrite( const void *__''ptr''__, size_t__ ''size''__, size_t__ ''nmemb''__, FILE *__''stream''__);__ !!DESCRIPTION The function __fread__ reads ''nmemb'' elements of data, each ''size'' bytes long, from the stream pointed to by ''stream'', storing them at the location given by ''ptr''. The function __fwrite__ writes ''nmemb'' elements of data, each ''size'' bytes long, to the stream pointed to by ''stream'', obtaining them from the location given by ''ptr''. !!RETURN VALUE __fread__ and __fwrite__ return the number of items successfully read or written (i.e., not the number of characters). If an error occurs, or the end-of-file is reached, the return value is a short item count (or zero). __fread__ does not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred. !!CONFORMING TO The functions __fread__ and __fwrite__ conform to ANSI X3.159-1989 (``ANSI C''). !!SEE ALSO feof(3), ferror(3), read(2), write(2) ----
18 pages link to
fread(3)
:
stdout(3)
perlfunc(1)
Man3f
fgetc(3)
getc(3)
getchar(3)
gets(3)
getw(3)
putw(3)
setbuf(3)
setbuffer(3)
setlinebuf(3)
setvbuf(3)
ungetc(3)
stdin(3)
fgets(3)
read(2)
NetworkProgrammingOld
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.