title: What is the difference between %lx and %ld when printing an address from pointer?
body: <p>I have tried googling the first one for %lx, but I have no good results, BUT I have successfully searched up %ld which is just long int. Necessary for printing addresses I guess, but what is %lx for?</p>
  
  <p>This is where I am confused:</p>
  
  <pre><code>int main()
  {
      int value = 25;
      int *pointer = &amp;value;
      printf("%ld\n", pointer);  // prints out the address of variable value( I hope)
      printf("0x%lx\n", pointer); // Completely confused here, is this perhaps address in hex?
  }
  </code></pre>
  
  <p>Would be awesome if someone can clear this confusion I am having!</p>
  
  <p>I have ran this code, and I have the results, but I am still not sure what the lx does..I have seriously tried googling this "%lx" in google, but no results explaining it.</p>
  
  <p>Edit: if I use 'p' to print address then have I been wrong in thinking %ld prints address? Confused.</p>