Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (11 sloc) 242 Bytes
#include <stdio.h>
// Given character input, verify if a given character is EOF.
// (note that EOF is actually an int.)
main() {
int c;
while (c = getchar()) {
printf("%d: %d\n", c, c != EOF);
if (c == EOF)
break;
}
}