LearnFrenzy
Sign in Take a free test

C Const · const MCQ · Question 2

Is int const *p the same as const int *p? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links