title: Switch statements in C: variable in case?
body: <pre><code>#include &lt;stdio.h&gt;
  int main(int argc, char *argv[]){
      char a = 'c';
      switch('c'){
          case a:
              printf("hi\n");
      }
      return 0;
  }
  </code></pre>
  
  <p>The above won't compile for this error:</p>
  
  <pre><code>case label does not reduce to an integer constant
  </code></pre>
  
  <p>Why is this not allowed?</p>