Home » ftell() in C

C ftell() function

The ftell() function returns the current file position of the specified stream. We can use ftell() function to get the total size of a file after moving file pointer at the end of file. We can use SEEK_END constant to move the file pointer at the end of file.

Syntax:

Example:

File: ftell.c

Output:

Size of file: 21 bytes 
Next TopicC Preprocessor

You may also like