Home > Electronics Tutorials > C Language Tutorial > stdio.h - File Functions - fwrite

C Language Programming Library Reference Guide

stdio.h - File Functions - fwrite


size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); Writes data from the array pointed to by ptr to the given stream. It writes nmemb number of elements of size size. The total number of bytes written is (size*nmemb).

On success the number of elements written is returned. On error the total number of elements successfully written (which may be zero) is returned.

Note: To report broken links or to submit your projects, tutorials please email to Webmaster