title: How do you use printf to format pointer values as 0x0000...?
body: <p>When I use <code>printf</code> to print pointer values, they display in the format:
  <code>000000000066FE14</code>. I would like them to display in the <code>0x</code> format, such as: <code>0x66FE14</code>.</p>
  
  <p>This is the simple test program I wrote to print pointer values:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
      int x = 4;
      int *xAddress = &amp;x;
  
      printf("Address of x: %p\n", xAddress);
      return 0;
  }
  </code></pre>
  
  <p>This produces the output:</p>
  
  <pre><code>Address of x: 000000000066FE14
  </code></pre>