title: switch statement using string in C
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4165131/c-c-switch-for-non-integers">C/C++: switch for non-integers</a><br>
    <a href="https://stackoverflow.com/questions/4480788/c-c-switch-case-with-string">C/C++ switch case with string</a>  </p>
  </blockquote>
  
  
  
  <p>I am passing a string to a function get_band(char *str)
  Then I am comparing the passed argument with a specific string </p>
  
  <pre><code>if(strcmp(str, "auto"))
  {
    //do something
  }
  </code></pre>
  
  <p>My question is - since i have many number of strings to compare, how can i use switch statement instead of if/else, since switch statement supports only integral type.</p>