title: Strcpy Segmentation Fault C
body: <p>I am learning some new things and get stuck on a simple strcpy operation.
  I don't understand why first time when I print works but second time it doesn't. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      char *name;
      char *altname;
  
      name=(char *)malloc(60*sizeof(char));
      name="Hello World!";
      altname=name;
      printf("%s  \n", altname);
      altname=NULL;
      strcpy(altname,name);
      printf("%s  \n", altname);
      return 1;
  }
  </code></pre>