An array can store elements of __________.

2023

An array can store elements of __________.

  1. A.

    Only strings

  2. B.

    Only integers

  3. C.

    Different data types

  4. D.

    Same data type

Attempted by 408 students.

Show answer & explanation

Correct answer: D

An array is a linear data structure that stores a collection of elements of the same data type in contiguous memory locations. It cannot mix different types (like integers with strings) within the same array structure. Therefore, the correct option is D.

Explore the full course: Btsc Lab Assistant