#include <stdio.h>
int main(void)
{
FILE *fp = fopen("d:\\data.txt", "r");
if (fp == NULL)
perror("Error open file\n");
else
{
char ch;
while ( (ch = fgetc(fp)) != EOF)
printf("%c", ch);
}
if (feof(fp))
puts("\nEnd of File\n");
else
puts ("\nNot End of File\n");
fclose(fp);
return 0;
}
/*
run:
code for fun
End of File
*/