The ________ statement is used to exit a loop prematurely.
- break
- continue
- return
- switch
In programming, the "break" statement is used to exit a loop prematurely. It is often used in loops such as "for" and "while" to terminate the loop based on a specific condition. The "break" statement is not used to return from a function, control a switch statement, or skip the current iteration of a loop, so it is the correct option.
Loading...
Related Quiz
- What is the purpose of the 'switch' statement in C?
- How does the memory alignment of a structure's members affect its total size?
- In a C program, you notice that data written to a file is not immediately visible on the disk. What could be a reason for this delay?
- In C, a structure member with a specified width is known as a ________.
- Which preprocessor directive would be used to conditionally compile certain blocks of code?