开发者

for loop syntax execution in C language [closed]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜