ftell

Full prototype:

long int ftell(FILE*);  

Purpose and Notes:

Gets and returns the current file position for the stream associated with the only argument's FILE*. For a binary file this is the number of characters from the beginning of the file. For text files it is implementation dependent (maybe don't rely and do math on the values), but usable for the fseek() function.

fsetpos() and fgetpos() are recommended for more portable code, but can be a bit clunkier and more irritating to use.

Returns:

long int-Returns -1 on failure/error and returns the current file position otherwise. For binary files the return is the number of characters since the beginning of the file, but for text files it is implementation defined so maybe you should do math with the results.

Argument 1:

FILE*-A stream associated with the FILE* from which you want to the current position from.

Example 1
  1    FILLER SOURCE CODE
FILLER TERMINAL