In Kernighan and Ritchie (the C programming language):
'Write a program to print the value of EOF'
I wrote:
#include <stdio.h>
main(){
int c;
c = getchar();
if ((c = getchar()) == EOF)
putchar(c);
}
but it doesn't output anything Why?