The fseek |
FILE *fp; // open for reading and/or writing // move cursor to start of file (rewind) fseek(fp, 0L, SEEK_SET); // move cursor to end of file fseek(fp, 0L, SEEK_END); // backup one byte in file fseek(fp, -1L, SEEK_CUR); |
For a more extensive example:
testseek.c