Do the following. If there is ANYTHING that you do not COMPLETELY understand, bring your questions to class.
Open this Paper-and-Pencil Exercise on Box-and-Pointer Diagrams, which we will hereafter call the document.
First, watch this video that introduces Problem 1 of this Box-and-Pointer exercise, reading page 1 of the above document as you do so.
Now, do Problem 1 of the exercise, on page 2 of the document.
Next, watch this video that works through the solution to Problem 1 of this Box-and-Pointer exercise.
Now, do Problem 2 of the exercise, on page 3 of the document.
After you have completed Problem 2, watch this video that works through the solution to Problem 2 of this Box-and-Pointer exercise.
Next, read page 4 of the document.
Read carefully!
Note especially that calling a function causes the following:
See the purple arrows at the bottom of page 4, noting that they are drawn from the namespace for the called function foo BACK TO the namespace for the caller (which is main in this case).
Again, READ PAGE 4 CAREFULLY!
Now, do Problem 3 of the exercise, on page 5 of the document.
After you have completed Problem 3, watch this video that works through the solution to Problem 3 of this Box-and-Pointer exercise.
Now, do Problem 4 of the exercise, on page 6 of the document.
After you have completed Problem 4, watch this video that works through the solution to Problem 4 of this Box-and-Pointer exercise.
For your reference, here is a printed SOLUTION to the Paper-and-Pencil Exercise on Box-and-Pointer Diagrams that you have just completed.
If there is ANYTHING that you do not COMPLETELY understand from this exercise, bring your questions to class.