title: Printing command line arguments char by char in C
body: <p>Here's what I have:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  
  int main(int argc, char **argv)
  {
  
      while(*argv++ != 0)
      {
              printf("Argument!\n");
              printf("%s %d\n",*argv,(int)strlen(*argv));
              int i = 0;
  
              while(*argv[i])
              {
                      printf("char!\n");
                      printf("%c\n",*argv[i]);
                      i++;
              }
  
              printf("End of for loop\n");
      }
  
      return 0;
  }
  </code></pre>
  
  <p>When I run ./a.out test, the output is:</p>
  
  <pre><code>Argument!
  test 4
  char!
  t
  Segmentation Fault
  </code></pre>
  
  <p>I've been staring at this for a few hours. Why won't my program print each command line argument character by character? </p>
  
  <p>I'm new to C, and the array-pointer duality, so I wouldn't be surprised if that were the problem. Any help is appreciated!</p>