%p Format specifier in c

If this is what you are asking, %p and %Fp print out a pointer, specifically the address to which the pointer refers, and since it is printing out a part of your computer’s architecture, it does so in Hexadecimal.

In C, you can cast between a pointer and an int, since a pointer is just a 32-bit or 64-bit number (depending on machine architecture) referring to the aforementioned chunk of memory.

And of course, 55 in hex is 85 in decimal.

Leave a Comment