title: switch case use with array in c language
body: <p>How can I use switch case with array in C? I know I can use if statement to fulfill my need like:</p>
  
  <pre><code>char *choice[]={'option1', 'option2'}
      if (strcmp choice[0], input)==0){
          // do the job
      }
      else{
          // something
      }
  </code></pre>
  
  <p>So the reason I wrote this is because I have seen people giving some good guides here but its not what the person asked for so just wanted to clarify that I know the concepts its just I to get the hints or relevant example to see how i can use switch case with array in C language. There are some places which says switch cannot use array strings so want to clarify if thats true.</p>