Question 10
Back to Exercise
For const int *const p = &x;, which is allowed?
- A *p = 5;
- B p = &y;
- C Reading *p Correct
- D Both *p = 5 and p = &y
Correct Answer: Option C
The first const protects the int, the second the pointer. Only reading through p is allowed.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!