Question 2
Back to Exercise
Which declaration means the same as const int *p?
- A int *const p
- B int const *p Correct
- C const int *const p
- D int *p const
Correct Answer: Option B
The order of const and the type name does not matter; what matters is whether const is before or after the *. Both declare a pointer to a const int.
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!