Question: Give the output from this code fragment: int *p1, *p2; p1 = new int; p2 = new int; *p1 = 10; *p2 = 20; cout
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;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
