Program to Count number of characters in existing file.



/*Count number of characters in existing file.*/

#include
#include
FILE *fp;
main()
{
char ch;
fp=fopen("myfile","r");
clrscr();
fseek(fp,0L,2);
ftell(fp);
printf("\nNumber of character in specified file are %d",ftell(fp));
fclose(fp);
}

No comments:

Post a Comment