CS-211 Lab 6 -- Debugging/Decoding

Background

Labs are going to start getting a little more challenging. This week, we are concentrating on debugging code. Therefore, you get to debug my code. I've given you four different programs. Each program has a coded message embedded in it. If you specify the correct parameter, and if you fix all the bugs in the program, then the program will print out the decoded message, and give a hint about the parameter to the next program. Part of the challenge is that you will see some constructs in the code we haven't studied yet, but I've tried to restrict the bugs to parts of the code you should be very familiar with. But take a look at the new stuff as well... we'll be getting to the new stuff soon.

Getting Started

Download the lab06.tar.gz file I have provided for you, and move it to your cs211 directory. If you then run the command:

tar -xvzf lab06.tar.gz

The tar command will create a lab06 directory with four files... step1.c, step2.c, step3.c and step4.c. Start with step1. Compile the code, and start fixing bugs. When you run step1 with the right command line arguments, it will print out a decoded message that gives a hint about the step2 parameter. Cut and past this message into a file called answers.txt. Then go on to step2. Keep doing this until either you figure everything out, or you run out of time.

Lab Submission

Go to MyCourses, and open the CS-211 page, and choose the "Content" hyperlink on the left list of options. You will see a "Lab 06 Submission" icon to upload your answers.txt file. Make this submission before the due date of Friday, October 13, at 11:59 PM. You may submit as many times as you want before the due date, but only the latest submission will be graded.

Lab Grading

This lab is worth 10 points. You will get deductions as follows: