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

Discussion

Array can be considered as set of elements stored in consecutive memory locations but having __________.

  • A.Same data type
  • B.Different data type
  • C.Same scope
  • D.None of these

Answer: A

Correct answer: Same data type

The two defining properties of an array are that its elements lie in consecutive memory locations and that they are all of the same data type. The second follows from the first: address arithmetic can only step through the array if every element occupies the same number of bytes.

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

Post your comment

Please log in or register to post a comment.