QWhich of the following correctly declares an array of 10 integers?
Question Info
Choose the Best Option
Click any option to instantly check if you're correct.
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++.
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
Nice — 3 questions done!
Don't lose this streak. Sign up free to save your score and pick up exactly where you stopped.
Share This Question
Challenge a friend or share with your study group.