title: Please explain the nested switch-case statements in the following C program and the corresponding output
body: <p>On compiling and running the code below, we get the output as stated. Please explain the output. <code>case 2</code> is nested in <code>case 0</code> so the program shouldn't print anything at all. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
      int i=5;
      switch ( 2 ) {
          case 0:
              for (  i=0; i&lt;10; i++ ) {
          case 1:
              printf("A i=%d\n",i);
          case 2:
              printf("B i*i=%d\n",i*i);
              };
          case 3:
              printf("done");
              break;
      }
  
      return 0;
  }
  
  /* OUTPUT
  B i*i=25
  A i=6
  B i*i=36
  A i=7
  B i*i=49
  A i=8
  B i*i=64
  A i=9
  B i*i=81
  done
  */
  </code></pre>