title: What does switch do if there is no default case?
body: <p>I have found a following piece of code:</p>
  
  <pre><code>switch(val){
      case 0:
          // some actions
         break;
      case 1:
          // some actions
         break;
      case 2:
          // some actions
         break;
  }
  </code></pre>
  
  <p>But it is not clear enough what will happen in the case of e.g <code>val = 10</code>?</p>
  
  <p>I tried to test this code in a short program with incorrect value, and nothing had happen - program exited normally.</p>
  
  <p>Can this code cause any potential error? Is there any guarantee that nothing will happen?</p>