for (i=0 ; i<=10; i++)
{
..
..
}
i=0;
while(i<=10)
{
..
..
i++;
}
In for and while loop, which one is better, performanc
Program efficiency comes from proper algorithms, good object-design, smart program architecture, etc.
Shaving a cycle or two with for loops vs while loops will NEVER make a slow program fast, or a fast program slow.
If you want to improve program performance in this section, find a way to either partially unroll the loop (see Duff's Device), or improve performance of what is done inside the loop.