title: printf and pointers
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9053658/correct-format-specifier-to-print-pointer-address">Correct format specifier to print pointer (address)?</a>  </p>
  </blockquote>
  
  
  
  <p>When printing a pointer using <code>printf</code>, is it <em>necessary</em> to cast the pointer to <code>void *</code>?  In other words, in code like</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main() {
      int a;
      printf("address of a = %p\n", &amp;a);
  }
  </code></pre>
  
  <p>should the argument really be <code>(void *) &amp;a</code>?  <code>gcc</code> doesn't seem to give any warnings when no explicit cast is made.</p>