Consider the two following C++ programs
| #define L 1000
int main() {
int array[L][L];
for (int i=1; i < L; i++)
for (int j=1; j < L; j++)
array[i][j] = i*j;
return 0;
}
|
| #define L 1000
int main() {
int array[L][L];
for (int j=1; j < L; j++)
for (int i=1; i < L; i++)
array[i][j] = i*j;
return 0;
}
|
Usually, one would expect them to run typically in the same time. Do they?