ftell in C



File Operations in Tamil


C - ftell

  • "ftell" returns the current position for input or output on the file.
 c-fread

C Syntax

 offset = ftell( file pointer ); 

Example

#include<stdio.h>
#include<conio.h>
int main(void)
{
   FILE *stream;
   stream = fopen("one.txt", "w");
   fprintf(stream, "This is a test");
   printf("The file pointer is at byte %ld\n", ftell(stream));
   fclose(stream);
   getch();
   return 0;
}

Output

 c-ftell

Learn C - C tutorial - C ftell - C examples - C programs



View More Quick Examples


Related Searches to ftell in C