1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <stdio.h> /* The C Programming Language, 2nd Edition * * Exercise 1-6: Verify that the expression 'getchar() != EOF' is 0 or 1. * * Answer: Easy. */ int main(void) { int c; c = (getchar() != EOF); printf("%d\n", c); return 0; }