title: getopt switch statement never hitting default case
body: <p>I've tried searching and haven't found a duplicate/similar question.</p>
  
  <p>How come "default" is never triggering in this case? Working on some previous homework assignments for a course to prepare for the fall, and I'm having an issue with getopt() in C.</p>
  
  <p>Here are the particular lines in question:</p>
  
  <pre><code>while ((c = getopt(argc, argv, "i:o:")) != -1) {
          switch (c) {
              case 'i':
              inFile = strdup(optarg);
              break;
  
              case 'o':
              outFile = strdup(optarg);
              break;
  
              default:
              usage(); //this prints the "usage" statement and exits cleanly.
          }
      }
  </code></pre>
  
  <p>My issue is, how come calling </p>
  
  <pre><code>./fastsort a b c d
  </code></pre>
  
  <p>doesn't print the usage and exit? </p>