MCQ
Single Best Answer
Moderate
QWhich of the following correctly declares an array of 10 integers?
ID: #24490
Array in C++
21 views
Question Info
#24490Q 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 C
Explanation
To declare an array in C++, you must specify:
-
The data type
-
The array name
-
The number of elements inside square brackets
[ ]
int arr[10];
This correctly declares an array that can store 10 integers.
Why other options are incorrect
-
A)
int arr;❌ → Declares a single integer, not an array -
B)
int arr(10);❌ → Not valid array syntax -
D)
array int arr[10];❌ → Invalid C++ syntax
Correct Answer: C) int arr[10];
Description:int arr[10] is the correct way to declare an array of 10 integers in C++.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic