Which of the following correctly declares an array in C++?
Asked In:
BPSC TRE 1.0
Options
-
A.
array{10};
-
B.
int array;
-
C.
int array[10];
-
D.
More than one of the above
-
E.
None of the above
Correct Answer (Detailed Explanation is Below)
C.
int array[10];
Detailed Explanation
Correct Answer: Option C — int array[10];Explanation: The declaration int array[10]; creates an array named array that can store 10 integers. The array indices range from 0 to 9.