int a = 100, b = 200; int *p = &a, *q = &b; p = q;
a) b is assigned to a
b) p now points to b
c) a is assigned to b
d) q now points to a
int a = 100, b = 200; int *p = &a, *q = &b; p = q;
a) b is assigned to a
b) p now points to b
c) a is assigned to b
d) q now points to a
You must be logged in to post a comment.
b
Explanation: Assigning to reference changes the object to which the reference is bound.