size_t fwrite ( const void * ptr, size_t size, size_t count, FILE * stream );
(size*count)
unsigned char
123456789101112
/* fwrite example : write buffer */ #include <stdio.h> int main () { FILE * pFile; char buffer[] = { 'x' , 'y' , 'z' }; pFile = fopen ("myfile.bin", "wb"); fwrite (buffer , sizeof(char), sizeof(buffer), pFile); fclose (pFile); return 0; }