Writes elements to a stream.
#include <stdio.h> size_t fwrite ( const void *buf, size_t elsize, size_t nelem, FILE *fp);
(IN) Points to the buffer containing the data to write.
(IN) Specifies the size (in bytes) of each element.
(IN) Specifies the number of elements.
(IN) Points to the file.
If successful, returns the number of complete elements that are successfully written. If a write error occurs, the number returned can be less than the requested number. If a write error occurs, fwrite sets the error indicator for the stream and sets errno to one of the following: