If I have an int array called x that's 3x3. x[0] returns a location. What exactly is that location? Would that be the entire first row?
Last edited on
2D arrays and 1D arrays are fairly similar.
x[0][0] = x[0]
x[0][1] = x[1]
x[0][2] = x[2]
x[1][0] = x[3]
x[1][1] = x[4]
x[1][2] = x[5]
x[2][0] = x[6]
x[2][1] = x[7]
x[2][2] = x[8]