Loop and switch case

the break in switch helps to exit the switch cases ,so if we use switch statement inside a loop and when the compiler reads break statement does it also exits out of the loop or just the switch conditions?
if not then how can we exit from both switch and the loop by a single statement?

It will exist from switch only
If you want to exit from both
Either use some logic with the help of flag variable or use return statement

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.