>>5
Not portable. Files opened in text mode need not return byte offsets from
ftell() (the values might be "seek descriptors", suitable for passing to
fseek() but useless otherwise).
>>8
Not portable. Files opened in binary mode need not support
SEEK_END.
size_t n = 0; while (fgetc(f) != EOF) ++n;