codeGK
Code it ALL
Break out of For Loop in C - CodeGK

♦ Break out of For Loop in C

♣ Example1: Break out of For Loop in C

In this example, control is switched out of a For Loop.
To be specific if the loop encounters value 6, it breaks.
Example
Input:
Output: