| Example | |
#include <rtl.h>
#include <stdio.h>
void tst_ftell (void) {
U32 fpos;
char line[80];
FILE *fin;
fin = fopen ("Counter.log","r");
if (fin == NULL) {
printf ("File not found!\n");
}
else {
fgets (&line, sizeof (char), fin);
// Get position after read
fpos = ftell (fin);
fclose (fin);
}
}
|