What will happen in the following C++ code snippet?

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

1 thought on “What will happen in the following C++ code snippet?”

Leave a Comment