title: I don't understand the result of this little program
body: <p>i've made this little program to test a little part of a bigger program.</p>
  
  <pre><code>    int main()
  {
      char c[]="ddddddddddddd";
      char *g= malloc(4*sizeof(char));
      *g=NULL;
      strcpy (g,c);
  
      printf("Hello world %s!\n",g);
      return 0;
  }
  </code></pre>
  
  <p>I expected that the function would return "Hello World dddd" ,since the length of g is 4*sizeof(char), but it returns  " Hello World ddddddddddddd ".Can you explain me Where I'm wrong ?</p>