title: What does allocating memory of size char * do?
body: <pre><code>char    *str;
  str = malloc(sizeof(char) * 5);
  </code></pre>
  
  <p>This code allocates 5 consecutive slots of memory to the variable <code>str</code>, which is of type <code>char *</code>.</p>
  
  <pre><code>char    *str;
  str = malloc(sizeof(char *) * 5);
  </code></pre>
  
  <p>This is supposed to allocate 5 times the memory of an array of char. But since an array of char has no size until we declare it, what does this statement actually do?</p>