LearnFrenzy
Sign in Take a free test

Pointers · Pointer Basics MCQ · Question 8

a[i] is the same as which pointer expression? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 8 Back to Exercise

For an array a, the expression a[i] is equivalent to…

  • A *a + i
  • B *(a + i) Correct
  • C &a + i
  • D *(&a + i)
Correct Answer: Option B

The C standard defines a[i] as *(a + i): move i elements from the start, then dereference. *a + i adds i to the first element's value instead.

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.

Popular