title: Is there an equivalent of %*, or Environment.CommandLine in C?
body: <p>In other words, is there a way to capture the entire command line (or even the arguments part of the command line) in a single string, including all delimiters?</p>
  
  <p>I'm explicitly NOT looking for solutions that involve concatenating the elements of argv.
  Such solutions assume something about the delimiters or the formatting of the arguments.</p>
  
  <p>For example, let's take the below program:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(int argc, char** argv){
      int i;
      for (i = 0; i &lt; argc; i++)
          puts(argv[i]);
  }
  </code></pre>
  
  <p>If I run it like so:</p>
  
  <pre><code> Test.exe 1 2
  </code></pre>
  
  <p>I get the output:</p>
  
  <pre><code> Test.exe
   1
   2
  </code></pre>
  
  <p>This is not a problem, but when I run it like this:</p>
  
  <pre><code>Test.exe "1" "2"
  </code></pre>
  
  <p>And I get the exact same output, that's a problem.Basically, I'm trying to get the verbatim string that was issued as the command line.</p>