In a facebook group, I saw a question like :
If a row dominated two dimensional array in the following which one is advantage and why?
There is no difference in theory.
The practical advantage is in cache locality. If you access locations which are far apart, you increase the number of cache misses, which in turn makes the code run slower.
Depending on your processor cache size, you would perhaps need to replace 1000 with some reasonably bigger number in order to perceive the effect.