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
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
แบบทดสอบ
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม