title: In c, can a switch statement have 2 arguments?
body: <pre><code>int main()
  {
     switch(1,2)
     {
        case 1:printf("1");break;
        case 2:printf("2");break;
        default: printf("error");break;
     }
  }
  </code></pre>
  
  <p>Is this valid in c?</p>
  
  <p>I thought it shouldn't be , but when I compiled it , it shows no error and produces output 2. </p>