Array in C++ Array in C++ MCQ Details
MCQ Practice Single Best Answer Topic: Array in C++

Q Array indexing in C++ starts from

Question ID
#24491
Subchapter
Array in C++
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A 1
  • C -1
  • D Depends on compiler
Correct Answer: B

Explanation

In C++, array indexing always starts from 0.

That means:

  • The first element of an array is accessed using index 0

  • The second element uses index 1, and so on

Example:

int a[3] = {10, 20, 30};

Index-wise access:

  • a[0] = 10

  • a[1] = 20

  • a[2] = 30

Correct Answer: B) 0

Description:
C++ uses zero-based indexing for arrays.

Share This Question

Share this MCQ with your friends or study group.