Which is faster? code segment a double a[100][100];...for (int i = 0; i < 100; i++) {for (int j = 0; j < 100; j++) {a[i][j] = i * j;}} code segment b double a[100][100];...for (int j = 0; j < 100; j++) {for (int i = 0; i < 100; i++) {?
Answers
Answered by
2
Answer:
Explanation:
answer-See,here the for loops will run 100*100=10000 times in both program segments,hence both will take same time, hope you understood.
Answered by
47
Explanation:
Both has the same speed and velocity so both are faster
Similar questions