which one should be preferable from the following two nested for loops:
1.
for(i=0;i<100;++i)
{
for(k=0;k<10000;++k)
{
<lines of code>
}
}
2.
for(k=0;k<10000;++k)
{
for(i=0;i<100;++i)
{
<lines of code>
}
}
why?
meetjatin88 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
meetjatin88 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
vmanes 1,165 Posting Virtuoso
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.