Writes to a file.
size_t fwrite (char * buffer, size_t size, size_t count, FILE * stream);
Required Header |
<stdio.h> |
Return Value
This function returns the number of bytes written.
Parameters
buffer
The source buffer to write
size
The size of an item in bytes
count
The number of items
stream
A pointer to the open FILE structure
Remarks
The fwrite function writes size items to stream, which may be less than requested if an error occurs.