c - difference between *p++ and ++*p - Stack Overflow This increments value of variable pointed by p p points to a so value of a incremented to 6 and first printf() outputs: 6 (2): Whereas, in *p++ because of postfix ++, printf() first prints value of *p that is 6 from previous expression then p increment to next location of a
%p Format specifier in c - Stack Overflow 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
Why is the format of %p and %x different in a format string? 3 No %p expects the argument to be of type (void *) and prints out the address Whereas %x converts an unsigned int to unsigned hexadecimal and prints out the result And coming to what %p does is implementation defined but the standard just says that %p expects void* argument else the behavior is undefined