LearnFrenzy
Sign in Take a free test

Pointers and Dynamic Memory · Pointers MCQ · Question 4

int* a, b; – what is b? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 4 Back to Exercise

In int* a, b;, what is the type of b?

  • A int*
  • B int Correct
  • C int**
  • D It does not compile
Correct Answer: Option B

The * binds to each declarator, not to the type. Write int* a; int* b; on separate lines.

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