Question 103Asked in BPSC TRE 3.0 (2024) Computer Science Class 11-12

Which of the following is an advantage of using arrays?

  1. AConstant time insertion and deletion
  2. BAbility to store elements of different data types
  3. CRandom access to elements using an index
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (C) Random access to elements using an index

Explanation

Array elements sit in contiguous memory, so any element can be accessed directly by its index in O(1). Insertion and deletion cost O(n), and the elements must all be the same type.

From BPSC TRE 3.0 (2024) Computer Science Class 11-12 — Previous Year Paper

This is question 103 of BPSC TRE 3.0 (2024) 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.