fwrite

Full prototype:

size_t fwrite(const void* restrict, size_t, size_t, FILE* restrict);  

Purpose and Notes:

A function to interpret the buffer passed in as the first argument as simply binary data the size of the second argument and number of elements as the third argument written to the stream passed in as the fourth argument.

IN OTHER WORDS:
Writes from the first argument which is an array of data that is the size of the second argument to the stream passed in in the fourth argument as FILE* restrict. It writes only up to the third argument * second argument worth of data.

On an error it will return less a value less than that of the third argument and the stream will not be modified.

Returns:

size_t-The number of objects written successfully. If the number is less than that of which was passed as the third argument then there was an error that can be checked on the FILE* passed in as the fourth argument. Otherwise if it is the same as the third argument then it was successful in writing the contents to the stream.

Argument 1:

const void* restrict-An array of an unspecified type from which you want to write to stream passed in as the last argument as binary.

Argument 2:

size_t-The size of the type in which you want to write to the stream passed in as the fourth/final argument.

Argument 3:

size_t-The number of objects of size specified in the previous/second argument in which you want to write to the stream passed in as the fourth/final argument.

Argument 4:

FILE* restrict-A FILE* to the stream in which you want to write the data too.

Example 1
  1    FILLER SOURCE CODE
FILLER TERMINAL