You may have confused with the topic. So let me explain it.
In most of the computing languages , we have for and while loop. But in my example , I will declare the loop in c#.
When you decalre a for loop and while loop like this.
1.For loop
for(i=0;i<10;i++)
{
//do something
}
2.While loop
int i=0;
while(i<10)
{
//do something
i++;
}
From the 2 loops. When it comes to the complier , do they complie the same things?(except the int i that was declared outside the while loop.) If they don't , which one is better or more efficient?
Thanks in advance