Here's the solution to the user quiz. Aside from the memory bug, there's one main problem. A one dimensional array is indeed identical to a pointer, but a multi dimensional array is not. int array[x][y] is very different to int **array. In fact a pointer to a pointer is no array at all.

Whenever you access this construct, the program hits two different memory areas. This is much slower than using an array, which is a single contiguous memory area. There are further subtle problems with this coding style, so better don't use it in a real application.

If you do, you must use brackets, and you should use them even when not required by the language syntax. Otherwise either you or some other poor fellow working with your code will confuse this construct with a real multidimensional array, and then you'll get the nicest bugs and crashes.

To be on the safe side, use a normal multidimensional array for a static definition, and a single pointer for a dynamic definition, no matter how many dimensions.