title: Why is "switch-case" considering a #define'd identifier as constant but not a const-qualified variable?
body: <p>This program produces the following error:</p>
  
  <blockquote>
    <p>case label does not reduce to an integer constant|</p>
  </blockquote>
  
  <p>I simply fail to understand why an explicitly declared constant <code>third_cond</code>, assigned initializer <code>3</code>, that too inside the function body, is not considered a constant for <code>case 3</code> while a <code>#define</code>'d identifier <code>second_value</code> is considered a constant at the same time.The program works fine if I use the literal <code>3</code> instead of <code>third_cond</code> or simply <code>#define</code> <code>third_cond</code> as <code>3</code>. Please explain why it's so, unless this question is a duplicate. I checked,but didn't find an answer.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #define second_cond 2
  
  int main()
  {
     const int third_cond=3;
     int choice;
     printf("Enter your choice\n");
     scanf("%d",&amp;choice);
  
     switch(choice)
     {
         case 1:
         printf("Beggar");
         break;
         case second_cond:
         printf("Mugger");
         break;
         case third_cond:
         printf("Lugger");
         break;
         default:
         printf("Bugger");
     }
  }
  </code></pre>