Advertisements
Advertisements
प्रश्न
The break statement may not be used in a switch statement.
विकल्प
True
False
MCQ
सत्य या असत्य
उत्तर
This statement is False.
Explanation:
In a switch statement, the break statement is typically used to end one case and avoid "fall-through" to the next. Without a break, the code will continue to execute the next cases even if a match is obtained, which is typically undesirable. As a result, while the break statement is optional, it is commonly used in switch statements for control flow.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?