c/io/fwrite

Writes of objects from the given array  to the output stream. The objects are written as if by reinterpreting each object as an array of and calling fputc  times for each object to write those s into, in order. The file position indicator for the stream is advanced by the number of characters written.

If an error occurs, the resulting value of the file position indicator for the stream is indeterminate.

Return value
The number of objects written successfully, which may be less than if an error occurs.

If or  is zero,  returns zero and performs no other action.