Fall Semester, 2004
Due in class on Thursday, September 16th, 2004
Write a program to move data from input.dat (see below) to an output file. The four major requirements for this assignment are:
You can find source code for transport() in ~charliep/courses/networks-networking. If you get stumped on how to do the binary conversion get in touch and I'll walk you through one approach.
Bring a printed copy of your code to class to turn-in. Also print-out a screen-shot showing that your program works as advertised, diff is your friend here.
Please trap and check return codes where necessary. Your code should always be concise, but never at the expense of clarity.
Include in your finished product the ability to enable and disable debugging
messages with a single #define or other mechanism. Extra credit will be given
for a solution that doesn't involve the pollution of the code with constructs
such as:
#ifdef DEBUG
/* print some message */
#endif
For extra credit replace the char array implementation of binary number representation with a bit field or other more efficient data structure. How much space did you save by doing this?
For extra credit if argv[1] is not present than read from stdin and write to stdout.