college/Spring-2024/CS-2124/Assignment-1/src/C5.c

18 lines
342 B
C

#include "src.h"
#include <stdio.h>
void c5() {
FILE *f = fopen(FNAME, "r");
fseek(f, 0L, SEEK_END);
int foffset = ftell(f);
fclose(f);
solve(5, "Moving to a specific location in a file (end of file)",
fmtstr("Location in %s: %d", FNAME, foffset));
}
int main() {
print_header();
c5();
return 0;
}