After all, both these statements do the same thing...
int a = 10;
int *b = &a;
printf(\"%p\\n\",b);
printf(\"%08X\\n\",b);
For example
At least on one system that is not very uncommon, they do not print the same:
~/src> uname -m
i686
~/src> gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
[some output snipped]
gcc version 4.1.2 (Gentoo 4.1.2)
~/src> gcc -o printfptr printfptr.c
~/src> ./printfptr
0xbf8ce99c
bf8ce99c
Notice how the pointer version adds a 0x prefix, for instance. Always use %p since it knows about the size of pointers, and how to best represent them as text.