include<stdio.h>
main()
{ int i; // variable declared with name i
for(i=0;i<5;i++) // loop condition satisfied
{
int i=10; //new memory created with variable i and assign 10 to it with scope inside Forloop
printf("%d" , i); // print value of i which is declared inside for loop.
i++; //inner declare i which contain 10 is incremented.
}
return 0;
}
Note for every time loop condition check with outer declare i and dor every outer declared i every time new variable i is declared and assign 10 to it .
so output will be 10, 10, 10, 10, 10,
Atlast vlaue of outer i = 5 and inner i = 11