why does the following code produce segmentation fault : <p>i tried coping a string to a pointer using strcpy. it causes a segmentation fault.any reason for that.</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
int main()
{   
    char *str=NULL;
    strcpy(str,"C-DAC");
    printf("%s\n",str); 
    return 1;
}
</code></pre>
