title: Segmentation fault when parsing command line arguments
body: <p>I am getting a segmentation fault I am having trouble isolating the source of the fault.  I believe that for some reason argv and argc are not getting values, but I cannot figure out why.</p>
  
  <p>Here is the first part of my code.</p>
  
  <pre><code>int main(int argc, char **argv)
  {
  int i;
  int numArrays = 0;
  int test = 0;
  int opt = 0;
  
  printf ("Parsing....\n");  // This line gets printed
  printf(argv);    // this one doesn't even if being flushed immediately after
  printf(argc);    // when the previous line is deleted, this line also won't print
  fflush(stdout); 
  opt =  getopt(argc, argv, optString);  //  defined as optString = "qmc";
  
  while (opt != -1) {
      printf (opt);
      switch (opt) {
      //prevents program from printing to a file
      case 'q':
          tofile = 1;
          break;
      // max size of the prime numbers
      case 'm':
          maxPrime = atoi(optarg);
          break;
  
      case 'c':
          numProcs = atoi(optarg);
          break;
  
      default:
          break;
      }
  }
  </code></pre>
  
  <p>I'm tried to figure out what is going on, but I cannot see why argc and argv are not getting values.  I have used this exact same parsing code before and it has worked perfectly.  Usually segmentation faults are pretty easy (accessing memory locations you shouldn't be), but there is no reason I shouldn't have access to my command line arguments.</p>