| Summary |
#include <stdio.h>
U32 fwrite (
const void* buffer, /* data to write to file */
U32 size, /* size of each item */
U32 count, /* number of items to write */
FILE* stream); /* file stream to write to */
|
| Example |
#include <rtl.h>
#include <stdio.h>
void tst_fwrite (void) {
int count[10];
FILE *fout;
fout = fopen ("Counter.log","w");
if (fout != NULL) {
fwrite (&count[0], sizeof (int), 10, fout); // write an item 10 times to the file
fclose (fout);
}
}
|