If an array reference x[i][j] occurs inside nested for loops,
Answer: B
All modern languages (except FORTRAN) store arrays in row-major order, which gives best memory locality (smallest address jump between memory references) when j is the inner loop.
Rule: The rightmost subscript should be the inner loop.