Break statement

if there is the nested loop under the loop and in innermost loop there is break statement, so does the break statement moves the control from all the loop, to out ??

The break statements breaks the iteration of the loop in which it is present only. So if there are two loops and break statement is present in inner loop then the iteration of inner loop stops and control goes to outer loop.

The break statement only moves out of the inner loop.

Yes you are correct.

@Ankit003 Please mark your doubt as resolved if you are satisfied.

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.