size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
The number of elements that were output (nmemb) is returned.
This function outputs nmemb elements of size from the array pointed to by ptr to the output stream pointed to by stream. Only the standard input/output stdout or stderr can be specified for stream.