4.3BSD-UWisc/lib/learn/C/L15.1b

#print
Write a program that reads in lines, and prints each out
in reverse order (except that the newline should be
at the end).
Thus the line
cat food
should come out as
doof tac
Compile it and run it, then type "ready".
#once #create Ref1
This is odd.
This is even.

#once #create Ref2
.ddo si sihT
.neve si sihT

#once cp %s/getline.o .
#user
a.out <Ref1 >x1
#cmp x1 Ref2
#succeed
/*	one way to do this */
 #include <stdio.h>

main()
{
	char line[500];
	int n;

	while ((n = getline(line, 500)) > 0) {
		for (n -= 2; n >= 0; n--)
			putchar(line[n]);
		putchar('\n');
	}
}
#log
#next
17.1a 10
16.2a 5