#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *file1;
char c;
file1=fopen("find1.txt","r");
if(file1==NULL)
{
printf("\n file doesnt exist\n");
exit(1);
}
else
{
while(1)
{
c=fgetc(file1);
if(feof(file1))
{
break;
}
putc(c,stdout);
}
}
}
what i think how this code work is fgetc() take a character from file pointed by filepointer and put that character in "c".Next time it takes the next character from the file and put that in "c". does the filepointer get increment and point to next character?or it is handeled in any other way ?