Which of the following is the advantage of the array data structure?

2023

Which of the following is the advantage of the array data structure?

  1. A.

    Elements of mixed data types can be stored

  2. B.

    Easier to access the elements in an array

  3. C.

    Index of the first element starts from 1

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 1357 students.

Show answer & explanation

Correct answer: B

Arrays provide direct access to elements using their index, which allows for fast retrieval and efficient memory access. This is a key advantage of arrays. However, arrays store elements of the same data type, not mixed types. Also, indexing typically starts from 0 in most programming languages, not 1. Therefore, only the advantage related to easy access is valid. Other options either misstate properties or claim multiple advantages when only one is correct.

Explore the full course: Up Lt Grade Assistant Teacher 2025