title: In C are malloc(256) and malloc(sizeof(char)*256) equivalent?
body: <p>I see that people often write C code such as:</p>
  
  <pre><code>char *ptr = malloc(sizeof(char)*256);
  </code></pre>
  
  <p>Is that really necessary? The standard says that <code>sizeof(char)==1</code> by definition, so doesn't it make sense just to write:</p>
  
  <pre><code>char *ptr = malloc(256);
  </code></pre>