title: C switch case default always executes
body: <pre><code>while ((c = getchar()) != '4') {
      switch (c) {
          case '1':
              printf("You pressed 1");
              break;
          case '2':
              printf("You pressed 2");
              break;
          case '3':
              printf("You pressed 3");
              break;
          case '4':
              break;
          default:
              printf("%c Wrong input, try again\n", c);
              printMenu();
      }
  }
  return 0;
  </code></pre>
  
  <p>}</p>
  
  <p>ok, so i don't understand why default always executes.  when i press either 1-3 it prints the massage in that case and right after it goes to execute the default case. what's wrong with the code?</p>