What is the priority with nested case, for and if loop?

break, c, subroutine, switch-statement

Solution

The `for` loop.

Please see: `break` Statement (C++):

The break statement ends execution of the nearest enclosing loop or conditional statement in which it appears. Control passes to the statement that follows the ended statement, if any.

Problem

I have a program similar to this: ``` switch(x) { case 1: for(i=0; i<10; i++) { if ((i==3) || (i==4) || (i==5) || (i==6) || (i==7)) { if (foobar[i]) break; // i am talking about this break } } ...further program break; /not this break ``` if `foobar[i]` is true, would the program break out of the `case` label or the `for` loop?

Original source