Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of these best describes an array ?

  • A.A data structure that shows a hierarchical behaviour
  • B.Container of objects of similar types
  • C.Container of objects of mixed types
  • D.Heterogeneous data types

Answer: B

An array is best described as a container of objects of similar types.

An array stores a fixed number of elements of the same type in consecutive memory locations, so any element can be reached directly by its index.

A hierarchical structure is a tree, not an array. Containers of mixed or heterogeneous types are structures (records) or, in object-oriented languages, collections of base-class references, so those options describe something else.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.