Fseek Rewind Ftell position in a file or report current position #include <stdio.h> fseek FILE *fp long offset int place rewind FILE *fp long ftell FILE *fp Description Fseek repositions the next character position of a file for either read or write. The new position is a "offset" bytes from the beginning of the file if "place" is 0, the current position is 1, or the end if 2. Fseek sorts out the special problems of buffering. NOTE that using "lseek()" on a buffered file will produce unpredictable results. Rewind is equivalent to "fseek(fp,0L,0)". Ftell returns the current position, measured in bytes, from the beginning of the file pointed to by "fp". Diagnostics Fseek returns -1 if the call is invalid. See Also System call lseek().