Modify your program to receive and echo input from the host. There
are two ways to do this – line at a time and character at a time (try both !).
Try testing your code using cat to send an entire file to your program at once
while capturing the output in another file. You can check your output using
“diff.” It is likely that the input and output don’t match (especially if you
perform the echo on a line at a time basis). We will return to this problem in
Chapter 11.