Recall & Review
beginner
What does the
continue statement do inside a loop in C#?The
continue statement skips the rest of the current loop iteration and moves control to the next iteration of the loop.Click to reveal answer
beginner
In which types of loops can you use the
continue statement in C#?You can use
continue in for, while, and do-while loops in C#.Click to reveal answer
intermediate
What happens if
continue is used inside a nested loop?The
continue statement affects only the innermost loop where it is used, skipping to the next iteration of that loop.Click to reveal answer
beginner
Can
continue be used outside of loops in C#?No,
continue can only be used inside loops. Using it outside will cause a compile-time error.Click to reveal answer
beginner
How does
continue differ from break in loops?continue skips the rest of the current iteration and moves to the next one, while break exits the entire loop immediately.Click to reveal answer
What does the
continue statement do in a for loop?✗ Incorrect
continue skips the remaining code in the current iteration and moves to the next iteration of the loop.Where can the
continue statement NOT be used?✗ Incorrect
continue can only be used inside loops. Using it outside causes a compile error.In nested loops, which loop does
continue affect?✗ Incorrect
continue affects only the innermost loop it is inside, skipping to its next iteration.What is the difference between
continue and break?✗ Incorrect
continue skips the rest of the current iteration, break exits the loop entirely.What happens if
continue is used in a do-while loop?✗ Incorrect
In a
do-while loop, continue skips to the condition check and then starts the next iteration if true.Explain how the
continue statement changes the flow inside a loop.Think about what happens after <code>continue</code> is executed inside a loop.
You got /3 concepts.
Describe the difference between
continue and break statements in loops.One stops the loop, the other skips part of it.
You got /3 concepts.