title: When printing a memory address of a variable using printf, why do %x and %p return different yet similar values?
body: <p>I am trying to print the memory address of a variable (specifically argc). I am using printf and I know that %x returns an unsigned hexadecimal integer and %p returns a pointer address. My simple code is below for reference</p>
  
  <pre><code>int main (int argc, char **argv) {
    printf("argc: addr=%x addrp=%p val=%x\n",&amp;argc,&amp;argc,argc);
    return 0;
  }
  </code></pre>
  
  <p>Ran like so: ./a.out this is</p>
  
  <p>It outputs: argc: addr=af5144cc addrp=0x7ffcaf5144cc val=3</p>
  
  <p>I see that the %x returns what is the address of a byte, correct? Since it has 8 digits or bits?</p>
  
  <p>However, %p returns what is the same byte with more info before it. What is the "0x7ffc" part and what does it mean? Is it part of the memory address or does it point out some type of information? I know the 0x part means it is a hexadecimal number. Is %x or %p the true memory address? Thanks!</p>