title: C - Problems with strcat
body: <p>I'm trying to get the user argv and print in the screen the result. Here is my following code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  int main (int argc, char *argv[])
  {
      if (argc &gt;= 1)
      {
          char *command = "gcc ";
          strcat(command, argv[1]);
          printf("%s", command);
          return 0;
      }
  }
  </code></pre>
  
  <p>It compiles, but every time I execute it says that "Windows stoped to work". Basically, if the user does: </p>
  
  <pre><code>myprogram.exe test
  </code></pre>
  
  <p>the output might be</p>
  
  <pre><code>gcc test
  </code></pre>
  
  <p>Where is my error?</p>