In each diagram, a box labeled p1 is above a box labeled p2 at left. The variations for different lines of code are as follows:

  1. int *p1, *0p2;

    p1 and p2 both contain a question mark.

  2. p1 = new int;

    p1 points to a box at right containing a question mark; p2 contains a question mark.

  3. *p1 = 42;

    Same diagram as (b), except the box at right contains the number 42 instead of a question mark.

  4. p2 = p1;

    Same diagram as (c), except both p1 and p2 now point to the box with 42, with no question marks.

  5. *p2 = 53;

    Same as diagram (d), except the box at right contains 53 instead of 42.

  6. p1 = new int;

    p1 points to a box at right with a question mark; p2 points to another box at right with 53.

  7. *p1 = 88;

    Same as diagram (f), except the box p1 points to contains 88 instead of a question mark.