CS120
Lab #9

Due at the end of lab.

For this lab you need to analyze how a program containing arrays, pointers, and pass-by-value and pass-by-reference arguments works. Note that you will only be graded on whether you turn in the lab, so do your best, but don't worry if some of your answers are wrong. However, similar questions are likely to appear on the next two exams, so make sure you understand the code by the end of the lab.

The code for the lab is here.

Before running the code try to trace through it. Take your time! And you may talk to other students in lab. When you think you know how the code works create a file with nano (or another text editor) and enter the values you expect to be printed for each of the variables:

Now run the code. In your file add the value that was actually printed after the value you guessed. For any value you got wrong figure out how the actual value got printed and put a brief description of the code in your file.

Turn in: The file with your guesses of the printed values, the correct values, and the reason for your mistakes (if any) to Canvas.