#include <stdio.h>

/* copy input to output;   */
main()
{
      int c;

      while ((c = getchar()) != EOF)
            putchar(c);
}

/*
Discuss:

- assignment is an expression (value is value of lhs after assigment)
- common loop idiom (parentheses needed b/c of precedence)
- c = getchar() != EOF  <===> c = (getchar() != EOF)
    why returns 0 or 1?

Exercise 1-7 (page 17)

*/