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 代碼
刪除
恢復自動保存:
?