2D Arrays: Creation and Access

AP Computer Science A· difficulty 4/5

m m[0]: ● m[1]: ● m[2]: ● [1, 2, 3] [4, 5, 6] [7, 8, 9]

The diagram shows that <code>int[][] m</code> is internally

  • A

    An array of references, each pointing to a row array

    check_circle
  • B

    A contiguous block of memory

  • C

    A 1D array

  • D

    A linked list

Explanation

Outer array's elements are references to int[] (rows).

Want 10 more like this — adaptive to your weak spots?

Related questions