fseek(fp,-2,SEEK_CUR);
seeks
backward two records from the current position.
fseek(fp,6,SEEK_SET);
seeks to relative record 6. You do not need to get an offset from ftell().
You cannot seek past the end or before the beginning of a file.
The first record of a file is relative record 0.
For AMODE 31 C/C++ applications repositioning within a large format sequential data set that need fseek() and ftell() to access positions beyond 2 GB - 1 record must use the large file version of fseeko() and ftello().