title: Are char * argv[] arguments in main null terminated?
body: <p>So I'm wondering if command line parameters are always null terminated? Google seems to say yes, and compiling on GCC indicates this is the case, but can I guarantee this to always be true?</p>
  
  <pre><code>int main(int argc, char** argv)
  {
      char *p;
  
      for(int cnt=1; cnt &lt; argc; ++cnt)
      {
          p = argv[cnt];
          printf("%d = [%s]\n", cnt, p);
      }
      return 0;
  }
  
  $ MyProgram -arg1 -arg2 -arg3
  1 = -arg1
  2 = -arg2
  3 = -arg3
  </code></pre>