Reputation: 13
#include<stdio.h>
int main()
{
int i=0;
for(;;)
{
if(i==10)
{
continue;
}
printf("%d",++i);
}
}
This above code makes the output as without print anything.But by my logic it prints the value from 1 to infinite times except 10.The continue statement doesn't run the below code after continue statement but the continue statement is inside the if condition then why it shouldn't run the statement that are below the continue statement?
Upvotes: 1
Views: 323
Reputation: 2388
Upvotes: 1