September 2001
Beginner
970 pages
23h 20m
English
| 1: | putchar(getchar()) is a valid expression; what does it do? Is getchar(putchar()) also valid? |
| A1: | The statement putchar(getchar()); causes the program to read the next input character and to print it; the return value from getchar() is the argument to putchar(). No, getchar(putchar()) is invalid because getchar() doesn't use an argument and putchar() needs one. |
| 2: | What would each of the following statements accomplish?
|
| A2: |
|
| 3: | Suppose you have a program count that counts the characters in its input. Devise a command that counts the number of characters in ... |
Read now
Unlock full access