(a) Write the Java statement to initialize the first 6 odd numbers in a 3 × 2 array.

ICSE Class 10 Computer Applications PYQ · 2025 Paper · Section A

2(ix)1 Mark · 2025 · Section A · 2025 Paper

(a) Write the Java statement to initialize the first 6 odd numbers in a 3 × 2 array.

(b) What is the result of x[0][1] + x[2][1] of the above array?

Show SolutionHide Solution↓

(a) x[3][2] = {{1, 3}, {5, 7}, {9, 11}};

(b) 14

  • x[0][1] = 3.
  • x[2][1] = 11.
  • Sum = 3 + 11 = 14.
← Previous questionNext question →

Browse the free Computer Applications sample bank