title: Segmentation fault around strcpy?
body: <p>I know that you will rap me over the knuckles but.</p>
  
  <p>Why does it make Segmentation fault</p>
  
  <pre><code>char* cmd;
  strcpy(cmd, argv[0]);
  </code></pre>
  
  <p>when this doesn't</p>
  
  <pre><code>char *cmd;
  cmd = "plop";
  </code></pre>
  
  <p>I didn't practice since a while, and can't remember why.</p>
  
  <p>ps: actually, i know that something like that, before the strcpy, would be better</p>
  
  <pre><code>char *cmd = (char*) malloc(strlen(argv[0]));
  </code></pre>
  
  <p>but i'm just wondering why this segmentation fault.</p>
  
  <p>Thanks !</p>