Consider the following C++ code segment: int a = 10, b = 20; int *p = &a, *q =…
PYQ DSSSB 2018
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?
- A.
Both a and b will contain 10
- B.
Both a and b will contain 20
- C.
Both p and q will point to a
- D.
Both p and q will point to b
Attempted by 876 students.
Sign up free to check your answer
Sign up freeLoading lesson…

