title: Segmentation fault on isdigit function
body: <p>I'm trying to check that the third command line is a digit so I did</p>
  
  <pre><code>int n;
  if (!isdigit(argv[3]))
      {
          fprintf(stderr, "n MUST be a number");
          return 4;
      } else 
      {
          n = atoi(argv[3]);
          printf("%i\n",n);
      }
  </code></pre>
  
  <p>but I'm getting</p>
  
  <pre><code>Segmentation fault
  </code></pre>
  
  <p>however if I just did</p>
  
  <pre><code>int n = atoi(argv[3]);
  </code></pre>
  
  <p>it works just fine, I don't really understand why</p>