Multiple choice

Assume the following C variable declaration:

int *A [10], B [10][10];

Which of the following expressions will not give compile-time errors if used as left hand side(s) of assignment statement(s) in a C program?

I. A [2]
II. A [2] [3] III. B [1]
IV. B [2][3]

  1. I, II and IV

  2. II, III and IV

  3. II and IV

  4. IV only

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Option (4) is correct.