title: newbie questions about malloc and sizeof
body: <p>Can someone explain to me why my call to malloc with a string size of 6 returns a sizeof of 4 bytes? In fact, any integer argument I give malloc I get a sizeof of 4. Next, I am trying to copy two strings. Why is my ouput of the copied string (NULL)?
  Following is my code:</p>
  
  <pre><code>int main()
  {
      char * str = "string";
      char * copy = malloc(sizeof(str) + 1);
      printf("bytes allocated for copy: %d\n", sizeof(copy));
      while(*str != '\0'){
          *copy = *str;
          str++;
          copy++;
      }
      copy = '\0';
      printf("%s\n", copy);
  }
  </code></pre>