title: Why this switch statement works that way?
body: <p>I got this question in C++ interview for the intership. I was really confused and still don't understand why it is working like that. The question was about output of the code below. Right output is 10, but my guess was 1. Can somebody explain this code?</p>
  <pre><code> int a = 1;
      switch(a)
      {
          case 0:
              do{
                  case 1:
                  a++;
              }while(a &lt; 10);
          break;
      }
  </code></pre>