The term "row major" refers not to C memory, but to a 2D matrix definition. If the 'Rows' and 'Cols' confused you, replace them simply with 'x' and 'y'.

In C you're normally using the inner loop for going through rows and the outer loop for going through columns. That's for speed and cache reasons.