What is the behavior of a continue statement inside a while loop?
- It skips to the next iteration of the loop immediately.
- It breaks out of the loop.
- It restarts the loop from the very beginning.
- It throws an exception.
The continue statement inside loops, including a while loop, causes the program to skip any code following it in the current iteration and jump to the next iteration. It doesn't break out of the loop but just moves to the evaluation of the loop's condition for the next iteration.
Loading...
Related Quiz
- In the context of recursion, what is a "recursive case"?
- What is the primary purpose of the return statement in C++ functions?
- Which of the following is a correct file extension for a C++ source file?
- What is the impact of template metaprogramming on compile-time and runtime?
- You are developing a financial application with various account types. How would you design the classes to achieve this and allow future modifications?