title: C - Case statement failing to compare variable
body: <p>I'm a little confused with the case statement in the PrintGenre function; it passes the value correctly, but defaults to Undefined.</p>
  
  <p>Little bit of background; this is ultimately becoming a (very simple) text music player, and I think I've found an easier way to do this, but just for my overall understanding I wanted to figure out why this case statement isn't functioning the way I wanted it to.</p>
  
  <p>If I remove the default option, it goes to the last case option in the list.</p>
  
  <p>I'm fairly new to the C language, so if there's anything I'm misunderstanding please let me know.</p>
  
  <pre><code>#include "terminal_user_input.h"
  #include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  enum musicGenre {Pop, Alternative_Rock, Electronic, Undefined};
  
  struct Album
  {
      my_string Title;
      my_string Artist;
      int Year;
      enum musicGenre Genre;
  };
  
  my_string PrintGenre(int Genre)
  {
      //Variables
      my_string result;
      printf("%d", Genre); //outputs correctly
      switch (Genre)
      {
          case 0:
              strcpy(result.str, "Pop");
          case 1: 
              strcpy(result.str, "Alternative Rock");
          case 2: 
              strcpy(result.str, "Electronic");
          default: 
              strcpy(result.str, "Undefined");
      }
      return result;
  }
  
  
  int main()
  {
      // Variables
      struct Album Album1;
      int choice;
  
      printf("1. Pop\n");
      printf("2. Alternative Rock\n");
      printf("3. Electronic\n");
      choice = read_integer("Please select a genre: ");
  
      switch (choice)
      {
          case 1:
              Album1.Genre = 0;
              break;
          case 2:
              Album1.Genre = 1;
              break;
          case 3:
              Album1.Genre = 2;
              break;
          default:
              Album1.Genre = 3;
              break;
      }
      printf("%d", Album1.Genre);
      printf("The genre of Album 1 is %s", PrintGenre(Album1.Genre).str);
  
      return 0;
  }
  </code></pre>