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コード
削除
自動保存:
を復元しますか?