| Example | |
#include <rtl.h>
#include <stdio.h>
void tst_fprintf (void) {
FILE *fout;
int i = 56;
fout = fopen ("Test.txt","w");
if (fout == NULL) {
printf ("File open error!\n");
}
else {
fprintf (fout, "printf test: val = %i fval =%f\n", i, i * 3.45);
fclose (fout);
}
}
|