Which code will run faster
for(i=0;i<100;i++)
for(j=0;j<10;j++)
a[i][j]=0;
OR
for(j=0;j<10;j++)
for(i=0;i<100;i++)
a[i][j]=0;
Which code will run faster
for(i=0;i<100;i++)
for(j=0;j<10;j++)
a[i][j]=0;
OR
for(j=0;j<10;j++)
for(i=0;i<100;i++)
a[i][j]=0;
EmbLogic Research & Competency Development Labs
Phone: +91 9818467776, 8527567776, 9650467776
Email: info@emblogic.com
Copyright © EmbLogic Embedded Technologies Pvt. Ltd.
second one
How come?? mean on what basis your answer is?
Is there any change when complier optimize the both?? i even see the assmebly code of both and both are same . So on what basis i can say which one is faster