EOF in any programming language is for End Of File.
So if you are trying to display the contents of file and want to stop when the file ends, you can use the condition to check EOF.
For example: -
#include <stdio.h>
void main()
{
FILE *fopen(), *fp;
int c;
fp = fopen("prog.c","r");
c = getc(fp) ;
while (c!= EOF)
{
putchar(c);
c = getc(fp);
printf("%c", c);
}
fclose(fp);
getch();
}
Hope this is helpful. Let me know if you need more help.
--
AJ