2. What is the output produced by the following code. You should also explain your answer in detail.
(10 分)
int *p1, *p2, *p3;
p1 = new int;
p2 = new int;
*p1 = 12;
*p2 = 15;
*p3 = 21;
cout << *p1 << " " << *p2 << " " << *p3 << endl;
p1 = p3;
cout << *p1 << " " << *p3 << endl;
*p1 = 32;
cout << *p1 << " " << *p3 << endl;
*p2 = *p3;
cout << *p2 << " " << *p3 << endl;
*p2 = 45;
cout << *p2 << " " << *p3 << endl;