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

Discussion

Choose the correct statements

  • A.All The elements of the array should be of the same data type and storage class
  • B.The number of subscripts determines the dimension of the array
  • C.Both A and B
  • D.In an array definition, the subscript can be any expression yielding a non-zero integer value

Answer: B

Correct answer: Both A and B

A is true: every element of an array has the same type and the same storage class, which is what makes uniform address arithmetic possible. B is true: the number of subscripts is the dimension - a[3][4] is two-dimensional. The remaining option is false, since a subscript may perfectly well be zero; indeed index 0 is the first element.

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

Post your comment

Please log in or register to post a comment.