Problem 1: 5.9
Problem 2: 5.10
Problem 3: 5.23 a, c, f
Problem 4: Draw a trace of the following program beginning on line 6. What is the output?
int main() {
int x = 3;
int y = 5;
int z = 7;
int *ptr1, *ptr2;
ptr1 = ptr2 = &x; // Begin trace here
x = 2;
ptr1 = &z;
*ptr1 = 4;
*ptr2 = 6;
ptr2 = &y;
*ptr2 = *ptr1;
z = 10;
cout << x << " " << y << " " << z << " " << *ptr1 << " " << *ptr2 << endl;
return 0;
}