fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int input;
  5. printf("EOF = %d\n",(int)EOF);
  6. for(;;) {
  7. input=getchar();
  8. printf("%d\n",input);
  9. if(input==EOF)break;
  10. }
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 2252KB
stdin
test
stdout
EOF = -1
116
101
115
116
10
-1