| 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) {
printf ("File open error!\n");
}
else {
fwrite (&count[0], sizeof (int), 10, fout);
fclose (fout);
}
}
|