Question 76Asked in BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is the advantage of the array data structure?
AElements of mixed data types can be stored
BEasier to access the elements in an array
CIndex of the first element starts from 1
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Easier to access the elements in an array
Explanation
Array elements are stored next to each other, so any element can be reached directly by its index in O(1) time. Arrays hold only one data type, and indexing starts at 0.
From BPSC TRE 1.0 (2023) Computer Science Class 11-12 — Previous Year Paper