The parentheses in a return statement are required.
查看答案
The output of the following code is ____. count = 1; /* initialize count */ while (count <= 10) { printf("%d ",count); count++; /* increment count */ }
A. 1 1 1 1 1 1 1 1 …
B. 1 2 3 4 5 6 7 8 9
C. 1 2 3 4 5 6 7 8 9 10
D. 1 2 3 4 5 6 7 8 9 10 11
The break statement violates pure structured programming principles because it provides a second nonstandard exit from a loop.
When a continue statement is encountered in a loop, the next iteration of the loop begins immediately.
In many situations, especially those that use a counter-controlled loop, the for statement format is easier to use than its while equivalent.