4 ms·
I really enjoy reading tips like this. The mnemonic I use for looping over multi-dimensional arrays in C is: the right-most index should be the inner-most loop:
by eliteraspberrie 13y ago
I really enjoy reading tips like this. The mnemonic I use for looping over multi-dimensional arrays in C is: the right-most index should be the inner-most loop:
for (i = 0; i < M; i++) {
for (j = 0; j < N; j++) {
x[i][j] = ...;
}
}