title: Using sizeof with a dynamically allocated array
body: <p>gcc 4.4.1 c89</p>
  
  <p>I have the following code snippet:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  
   char *buffer = malloc(10240);
   /* Check for memory error */
   if(!buffer)
   {
      fprintf(stderr, "Memory error\n");
      return 1;
   }
   printf("sizeof(buffer) [ %d ]\n", sizeof(buffer));
  </code></pre>
  
  <p>However, the sizeof(buffer) always prints 4. I know that a char* is only 4 bytes. However, I have allocated the memory for 10kb. So shouldn't the size be 10240? I am wondering am I thinking right here?</p>
  
  <p>Many thanks for any suggestions,</p>