Question 59Asked in BPSC TRE 1.0 (2023) Computer Science Class 11-12

Which of the following correctly declares an array in C++?

  1. Aarray{10};
  2. Bint array;
  3. Cint array[10];
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (C) int array[10];

Explanation

int array[10]; declares an array of 10 integers by giving the type, the name and the size in square brackets.

From BPSC TRE 1.0 (2023) Computer Science Class 11-12 — Previous Year Paper

This is question 59 of BPSC TRE 1.0 (2023) Computer Science Class 11-12 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.