Multidimensional arrays

Hi, im abit confuzed on how multidimensional arrays arrays work.

If i put, char board [4][6]; what would i be doing, would there be arrays IN arrays, which means that there is 5 (counting 0 aswell) arrays in total inside the board array, and each of those arrays can hold up to 7 (couting 0 aswell) values?

No. you are declaring a 4 element array, where each element is a 6 char array. There is no special slot for zeros.
The key here is that the syntax reflects the use of this array.
board[0] would be the first column of the array.
board[0][0] is the top leftmost element
board[3][5] would be the bottom rightmost element
Last edited on
So to put it simply, it is like making a table, if it were [3][5], then there would be 3 rows, and 5 columns, simple as that?
Topic archived. No new replies allowed.