If a break statement is encountered in a nested loop, it will exit _______.
- the outermost loop
- the innermost loop
- the function
- the program
When a break statement is encountered within a nested loop, it only exits the loop in which it's directly contained, i.e., the innermost loop. It does not affect any outer enclosing loops.
Loading...
Related Quiz
- The standard namespace used commonly in C++ is _______.
- Which of the following statements about the struct and class keywords is true?
- The _______ keyword is used to explicitly instantiate a template.
- The memory allocated for a struct is equal to the sum of the memory of its individual members, considering _______.
- The conditions in a switch-case statement must be of _______ data type.