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

Q What is an array in C++?

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

Choose Your Answer

Click an option to check whether your answer is correct.

  • A A collection of different data types
  • B A collection of same data type elements stored in contiguous memory
  • C A function that stores multiple values
  • D A pointer variable
Correct Answer: B

Explanation

An array in C++ is used to store multiple values of the same data type in a continuous block of memory.

This allows easy access to elements using an index.

Example:

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

All elements are integers and are stored next to each other in memory.

Why other options are incorrect

  • A) Different data types ❌ → Arrays store only same data type

  • C) Function ❌ → Arrays are not functions

  • D) Pointer variable ❌ → An array is not a pointer (though related)

Correct Answer:

B) A collection of same data type elements stored in contiguous memory

Description:
Arrays store multiple values of the same type in consecutive memory locations for efficient access.

Share This Question

Share this MCQ with your friends or study group.