title: Maximum number of cases that can be addressed using switch statement
body: <p>This is out of curiosity. What is the maximum number of switch cases I can have in a single <em>switch</em> including the <em>default</em>: case. I mean like this:</p>
  
  <pre><code>switch(ch)
  {
  case 1:
  //some statement
  break;
  case 2: 
  //some statement
  break;
  .
  .
  .
  .
  case n:
  //some statement
  break;
  default:
  //default statement
  }
  </code></pre>
  
  <p>My question is what is the maximum value that we can have here? Although this is not programatically significant, I found this a rather intriguing thought. I searched some blogs and found a statement <a href="http://www.cplusplus.com/forum/general/27965/" rel="noreferrer">here</a>.</p>
  
  <p>From a doc I have, it is said that:</p>
  
  <blockquote>
    <p>Standard C specifies that a switch can have at least 257 case
    statements. Standard C++ recommends that at least 16,384 case
    statements be supported! The real value must be implementation
    dependent.</p>
  </blockquote>
  
  <p>But I don't know how accurate this information is, can somebody give me an idea? Also what does it mean by <em>implementation dependent</em>? Suppose there is a limit like this, can I somehow change it to a higher or lower value?</p>