title: Switch statement with strings?
body: <p>I'm working on a small homework assignment and I'm supposed to make a food menu. Anyways, my switch isn't working. I'm trying to use a simple function that I can pass a value of "fish", "drink", or "chips" to and then it will output:</p>
  
  <pre><code>"Are you ordering FISH?" (or chips/drink)  
  </code></pre>
  
  <p>I can't get the switch to work, it's supposed to detect what I pass into it and then output a printf based on the switch case.  </p>
  
  <p><strong>CODE:</strong>  </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void menu() {
      printf("\nWelcome to Sunny FISH &amp; CHIPS!\n\n");
      printf("########     Fish :     Haddock(K) Large(L) | $5.00\n");
      printf("# FOOD #                Halibut(T) Large(L) | $4.00\n");
      printf("########     Chips:     Cut(C)     Large(L) | $2.00\n");
      printf("                        Ring(R)    Large(L) | $3.00\n");
      printf("                                            | \n");
      printf("##########   Soft Drinks(S)        Large(L) | $2.00\n");
      printf("# DRINKS #   Coffee(C)             Large(L) | $1.75\n");
      printf("##########   Tea(T)                Large(L) | $1.50\n");
      printf("---------------------------------------------\n");
      printf("Note: Medium price: 80%% of large.\n");
      printf("       Small price: 60%% of large.\n");
      printf("TAX is 10%%.\n");
      printf("More than 5 fish, 10%% discount on drink.\n");
      printf("Every 10 fish purchased, get 1 free softdrink.\n");
      printf("  - size of drink is according to size of fish\n");
  }
  
  void question (char choice[5]) {
      switch (choice[5]) 
      {
          case choice["fish"]:
              printf("Do you order FISH?\n");
          case choice["drink"]:
              printf("Do you order CHIPS?\n");
          case choice["chips"] :
              printf("Do you order DRINKS?\n");
          default :
              printf("Enter a valid choice: \n");
      }
  }
  
  main() {
  
      // menu();
      question("fish");
  
  }
  </code></pre>