Sail E0 Webinar
Question

What will happen in this code?
 int a = 100, b = 200;
 int *p = &a, *q = &b;
 p = q;


Options:
A .  b is assigned to a
B .  p now points to b
C .  a is assigned to b
D .  q now points to a
Answer: Option B

Assigning to refrence changes the object to which the refrence is bound.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers