khalfella

c_ch01_ex06.c

Sep 20th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. /*
  2. * Exercsise 1-6. Verify that the expression getchar() != EOF is 0 or 1.
  3. */
  4.  
  5. #include <stdio.h>
  6.  
  7. main() {
  8. int c;
  9. while (c = getchar() != EOF)
  10. printf("c = %d\n", c);
  11. printf("c = %d\n", c);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment