title: How to copy a string using a pointer
body: <p>Here's a program I wrote to copy a string constant.</p>
  
  <p>When the program is run it crashes. Why is this happening ?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  char *alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  char c;
  char *l;
  
  main(){
     while((c = *alpha++)!='\0')
         *l++ = *alpha;
     printf("%s\n",l);
  }
  </code></pre>