I was working with outputting an array and I noticed a funny thing happen when I got a for loop to output more 'rows' than the array had. It repeated the array as it went along, but one row higher? Why exactly did it do this?
It is laid out in contiguous memory with arr[0][0] residing at the lowest memory address and arr[10][19] at the highest.
The compiler simply computes the memory address of arr[n][m] by taking the address of arr[0][0] and offsetting it by ( n*20 + m ) * sizeof( char ) bytes.