|
|
1.1 root 1: #print
2: (Section 1.5)
3: Write a program that will read the first character
4: from its input and print it out in octal.
5: Compile it, test it, and then type ready.
6: #once #create Ref
7: +
8: #user
9: a.out <Ref >test
10: grep 53 test >/dev/null
11: #succeed
12: A possible solution:
13:
14: main()
15: {
16: printf("%o\n", getchar());
17: }
18:
19: Remember that you can use a function value almost
20: any place that you could use a variable like x.
21: Thus many times there's no need for extra variables.
22: #log
23: #next
24: 5.1c 10
25: 5.2b 5
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.