$ pico count3.c #include /* count3.c - count lines in input */ main() { int c, nl; nl = 0; while ((c = getchar()) != EOF) if (c == '\n') ++nl; printf("%d\n", nl); } $ gcc count3.c $ ./a.out < count3.c 11 $ ------------------------------------------------ 1. if (condition) statement; 2. if (condition) {statement1, statement2, ...}; 3. "==" is test for equality (while "=" is assignment operator). 4. '\n' is integer value of the single character between quotes. In ASCII, 'A' = 65, 'a' = 97, '1' = 49, '/n' = 10. 5. '\n' is a single character, "\n" is a (null terminated) string constant that contains a single character.