Skip to content

Instantly share code, notes, and snippets.

@giuscri
Last active December 23, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuscri/6706863 to your computer and use it in GitHub Desktop.
Save giuscri/6706863 to your computer and use it in GitHub Desktop.
silly code.
#include <stdio.h>
int
main(int argc, char* argv[])
{
int single_byte = getchar();
while (single_byte != EOF) {
single_byte = getchar();
printf("getchar() != EOF is %d.\n", single_byte != EOF);
if (single_byte == EOF)
printf("EOF is implemented in terms of 0x%x.\n", single_byte);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment