Teaching BPSC 4.0 बिहार उच्च माध्यमिक शिक्षक भर्ती (PGT) Mock Test Programming and Data Structure Programming in C Pointer
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