1) In which loop the condition comes before the body of the loop? a) for b) while c) do...while d) nested loop 2) In which loop the condition comes after the body of the loop. a) for b) while c) do..while d) nested loop 3) Identify the final value of x when the code int x; for(x=0; x<10; x++) {} is executed. a) 10 b) 9 c) 0 d) 1 4) Identify the type of looping process that test the condition at the end of the loop. a) for b) while c) foreach d) do...while 5) Which control structure indicates the do...while statement? a) Selection b) Loop c) Sequence d) Conditional 6) Choose the CORRECT syntax for for loop. a) for(initialization;condition; increment/decrement) b) for(increment/decrement; initialization; condition) c) for(initialization, condition, increment/decrement) d) for(initialization: condition: sequence) 7) Which is the following NOT a C++ pre-test loop? a) for b) while c) do...while d) All the above 8) Which is the following NOT a loop structure in C++ language? a) switch b) for c) while d) do..while 9) Select the CORRECT syntax for do...while loop. a) b) c) d) 10) Identify the output of the following code a) 1 3 4 5 b) 1 2 3 4 5 c) 5 4 3 2 1 d) 4 5 1 2 3 11) The statements within curly braces in a loop is known as _____________. a) body b) statement c) part d) comment 12) Based on the statement above, select the construct which has NOT been used: a) Sequence b) Selection c) Iteration d) All the above 13) A conditional loop is a loop which will repeat code until a condition is met. a) TRUE b) FALSE
0%
Quiz 3: Looping Control Structures
共享
共享
共享
由
Aisyahsuhailla
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?