|
|
#include <stdio.h>size_t fwrite(const void *buf, size_t size, size_t count, FILE *stream);
The fwrite( ) function writes count number of objects, each object being size bytes in length, to the stream pointed to by stream from the character array pointed to by buf. The file position indicator is advanced by the number of characters written.
In C99, buf and stream are qualified by restrict.
The fwrite( ) function returns the number of items actually written, which, if the function is successful, will equal the number requested. If fewer items are written than are requested, an error has occurred.
Related functions are fread( ), fscanf( ), getc( ), and fgetc( ).
|
|