Here is a program i have found to print the eof .but when it is compiled , its showing following errors:
In function âmainâ:
eof.c:5: warning: incompatible implicit declaration of built-in function âprintfâ
eof.c:6: error: âEOFâ undeclared (first use in this function)
eof.c:6: error: (Each undeclared identifier is reported only once
eof.c:6: error: for each function it appears in.)
Code:
#inlude <stdio.h>
int main(void)
{
printf("Press a key. ENTER would be nice :-)\n\n");
printf("The expression getchar() != EOF evaluates to %d\n", getchar() != EOF);
return 0;
}