Short Answer
Give the output from this code fragment:
int *p1,*p2;
p1 = new int;
p2 = new int;
*p1 = 10;
*p2 = 20;
cout << *p1 << " " << *p2 << endl;
*p1 = *p2;
cout << *p1 << " " << *p2 << endl;
*p1 = 30;
cout << *p1 << " " << *p2 << endl;
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q12: Given the definitions,<br>int *p1,*p2;<br>p1 = new int;<br>p2
Q13: A pointer is a variable that holds
Q14: Write a type definition for pointer variables
Q15: In deep copy,pointers are followed and data
Q16: An array name is a constant pointer
Q18: The default copy constructor and default operator
Q19: You can get a pointer value to
Q20: When declaring several pointer variables,there must be
Q21: Given the declarations below,write a code fragment
Q22: Tell about the freestore (also known as