Consider the following C++ code segment:

int a = 10, b = 20;

int *p = &a, *q = &b;

p = q;

With respect to the code segment mentioned above, which of the following statement is correct?

1
Both a and b will contain 20
2
Both p and q will point to b
3
Both p and q will point to a
4
More than one of the above
5
None of the above

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation