diff options
Diffstat (limited to 'usr.bin/learn/lib/C/L1.1f')
-rw-r--r-- | usr.bin/learn/lib/C/L1.1f | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/usr.bin/learn/lib/C/L1.1f b/usr.bin/learn/lib/C/L1.1f new file mode 100644 index 00000000000..b73e575d29b --- /dev/null +++ b/usr.bin/learn/lib/C/L1.1f @@ -0,0 +1,19 @@ +#print +(Section 1.2) +Write a program to print +the value of the character 'X' in +octal. Compile it and run it. +Then type ready. +#user +a.out >test +grep 130 test >/dev/null +#succeed +A possible solution: + +main() +{ + printf("%o\n", 'X'); +} +#log +#next +2.1a 10 |