C++ language › Array in C++ › Question #24489
Single Choice Moderate

QWhat is an array in C++?

ID: #24489 Array in C++ 48 views
Question Info
#24489Q ID
ModerateDifficulty
Array in C++Topic

Choose the Best Option

Click any option to instantly check if you're 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

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.

Today: 0 answered · 0 correct
Save progress
Free account

Want to remember what you got wrong?

Create a free account in seconds to track your score, revisit mistakes and continue C++ language where you left off.

  • Save your progress & streak
  • Topic-wise quizzes & scores
  • Bookmark tricky questions
  • Printable MCQ sets
Practice smarterFree account · save progress
Sign up free
No Previous Next Question

Share This Question

Challenge a friend or share with your study group.