ftell in C
File Operations in Tamil
C - ftell
- "ftell" returns the current position for input or output on the file.

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

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