Function fwrite

Top 

Declaration:

int fwrite(void buf[], int size, int n, unsigned long stream);

Description

Writes to a stream.

fwrite appends n items of data of size bytes long each to the given output file. The data written begins at buf. The total number of bytes written is (n * size). In the declarations, buf is an array object.

Returned Value

On successful completion fwrite returns the number of items (not bytes) actually written. On error it returns a short count.