ProgrammingHardGATE CS · Campus placements

int a[] = {10, 20, 30}; printf("%d", 2[a] - a[1]); What is printed?

  1. A. 10
  2. B. 20
  3. C. 30
  4. D. 0

Correct answer: A. 10

2[a] means a[2] = 30 because the subscript form is commutative. The difference 30 - 20 is 10.

More C Programming questions

Exams that ask this topic