MCQ
Single Best Answer
Moderate
QWhat is an array in C++?
ID: #24489
Array in C++
28 views
Question Info
#24489Q ID
ModerateDifficulty
Array in C++Topic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option 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.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic