Main index | Section 3 | 日本語 | Deutsch | Options |
#include <stdio.h>
The function fwrite() writes nmemb objects, each size bytes long, to the stream pointed to by stream, obtaining them from the location given by ptr.
The fread_unlocked() and fwrite_unlocked() functions are equivalent to fread() and fwrite() respectively, except that the caller is responsible for locking the stream with flockfile(3) before calling them. These functions may be used to avoid the overhead of locking the stream and to prevent races when multiple threads are operating on the same stream.
The function fread() does not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred. The function fwrite() returns a value less than nmemb only if a write error has occurred.
FREAD (3) | January 23, 2020 |
Main index | Section 3 | 日本語 | Deutsch | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Unix is a junk OS designed by a committee of PhDs. | ” |
— Dave Cutler |