How are the elements of a 2D array stored in the memory?