summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/C/L9.1a
diff options
context:
space:
mode:
authorIan Darwin <ian@cvs.openbsd.org>1998-09-28 16:01:29 +0000
committerIan Darwin <ian@cvs.openbsd.org>1998-09-28 16:01:29 +0000
commite9be7faad5fbf61edcad3700142615e315e407bc (patch)
tree5f3febafdfca4e38b83cbc129c87aefdece9ae70 /usr.bin/learn/lib/C/L9.1a
parent0436a5b6c19a613da918536b89a49cbcb38a2e4e (diff)
import BTL learn(1) lessons/C
Diffstat (limited to 'usr.bin/learn/lib/C/L9.1a')
-rw-r--r--usr.bin/learn/lib/C/L9.1a33
1 files changed, 33 insertions, 0 deletions
diff --git a/usr.bin/learn/lib/C/L9.1a b/usr.bin/learn/lib/C/L9.1a
new file mode 100644
index 00000000000..fc2c1cd407e
--- /dev/null
+++ b/usr.bin/learn/lib/C/L9.1a
@@ -0,0 +1,33 @@
+#print
+(Section 1.9 -- read 1.6-1.8 too.)
+Write a program that removes trailing blanks
+and tabs from each line of input, and deletes
+entirely blank lines. To make your job easier,
+you can use the function getline; its source
+is in getline.c.
+Type read when you are done.
+#once #create Ref
+ This file contains
+some trailing
+blanks
+and tabs
+
+
+
+
+and some empty lines.
+#once #create Ref1
+ This file contains
+some trailing
+blanks
+and tabs
+and some empty lines.
+#once cp %s/getline.c .
+#user
+a.out <Ref >test
+#cmp test Ref1
+#succeed
+No answer yet - sorry.
+#log
+#next
+10 10