When the cycle ends and the final result is output, and when the cycle is output once

CSDN Q & A 2021-12-30 05:48:29 阅读数:829

cycle ends final result output

This is the output of the final result

img


This is the output of the loop once

img




Refer to the answer 1:

Written in for The inside of the loop is that the loop outputs once , for example
for(){
printf
}
for()printf
Written in for outside , stay for After the loop , Just output once , for example
for{}
printf




Refer to the answer 2:



Refer to the answer 3:

printf stay for Output multiple times when in curly braces , Output once when outside




Refer to the answer 4:
版权声明:本文为[CSDN Q & A]所创,转载请带上原文链接,感谢。 https://primo.wiki/2021/12/202112300548272580.html