Switch/Case statements in C++
<p>Regarding the switch/case statement in the C++ code below: "Case 1" is obviously false, so how/why does it enter the do-while loop?  </p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main() {

    int test = 4;

    switch(test) {
        case 1: do {
            case 2: test++;
            case 3: test++;
            case 4: cout &lt;&lt; "How did I get inside the do-while loop?" &lt;&lt; endl; break;
            case 5: test++;
        } while(test &gt; 0);
        cout &lt;&lt; test &lt;&lt; endl;
    }
}
</code></pre>
