
W13: CP07 Quiz (BECC0302)
Quiz by Bryan N. Manalaotao
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
10 questions
Show answers
- Q1Which type of loop tests the condition before executing the loop body?nested loopsdo...while loopwhile loopfor loop30s
- Q2Which loop type tests the condition at the end of the loop body?nested loopsdo...while loopfor loopwhile loop30s
- Q3Which control statement immediately terminates the loop and transfers execution to the statement following the loop?gotoreturncontinuebreak30s
- Q4What happens to automatic objects created within a scope when execution leaves that scope?They are destroyed.They are transferred to the heap.They are preserved.They are converted to static objects.30s
- Q5Which of the following is a valid example of an infinite loop using a 'for' loop?for(int i = 0; i < 10; ) { }for(int i = 0; ; i++) { }for( ; ; ) { }for(int i = 0; i < 10; i++) { }30s
- Q6Which loop type is typically used for looping multiple of times, with a loop variable?nested loopswhile loopdo...while loopfor loop30s
- Q7What does the continue statement do in a loop?Skips the remainder of the loop body and retests the condition.Transfers control to a labeled statement.Terminates the loop.Ends the program.30s
- Q8Which control statement is generally not recommended for use due to its impact on readability and maintainability?continuebreakgotoreturn30s
- Q9In which type of loop would you use one or more loops inside another loop?nested loopsdo...while loopwhile loopfor loop30s
- Q10What is the effect of leaving the conditional expression empty in a 'for' loop?The loop will run once.The loop will not execute.The loop will be infinite.The loop will run until an external condition is met.30s