strcpy pass initialized null pointer c
<p>I'm trying out the following code:</p>

<pre><code>int main()
{
   char *yo = "yo";
   char *whaddup = NULL;
   strcpy(whaddup,yo);
}
</code></pre>

<p>and I get a segfault. Complete C noob here - other places say I should initialize <code>whaddup</code> as an array. Why can't I pass in a pointer to null?</p>