Returns the value of the file position indicator.
#include <stdio.h> long int ftell(FILE *stream);
stream
A pointer to a FILE stream.
The ftell() function returns the current value of stream's file position indicator. It is used in conjunction with fseek() to provide random access to a file.
The function will not work correctly when it is given a stream associated to a console file, such as stdin, stdout, or stderr, where a file indicator position is not applicable. Also, ftell() cannot handle files with sizes larger than what can be represented with a long int. In such a case, use the fgetpos() and fsetpos() functions.
This facility may have limited capability on configurations of the EWL that run on platforms that do not have console input/output or a file system.
ftell(), when successful, returns the current file position indicator value. If it fails, ftell() returns -1L and sets the global variable errno to a nonzero value.