开发者

for loop syntax execution in C language [closed]

开发者 https://www.devze.com 2023-03-26 05:08 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplet开发者_C百科e, overly broad, or rhetorical andcannot be reasonably answered in its current form. Fo
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplet开发者_C百科e, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

IN C what will be the actual execution when the for loop syntax is for (initializer;incrementation;condition) eg:

for(i=1;i<100;i++)
{
    printf("%d",i);
}


It will be

 123456789...99

Unless your libc doesn't flush stdout on close. Or are you asking how it works, in which, case, It's equavalent to:

initializer;
while(condition){
   ...
   incrementation
}

or

i=1;
while(i<100){
    printf("%d", i);
    i++;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号