int *p;
int *q;
p = new int;
*p = 35;
q = new int;
*q = 62;
p = q;
cout << *p << ", " << *q << endl;

answers :
a. 35, 35 c. 35, 62
b.62, 62 d.62, 35

b) 62, 62

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.