Keith Thompson said:
Richard Heathfield <rjh@see.sig.in validwrites:
>
Use %p *after* converting the value to void*.
>vhanwaribrahim@ gmail.com said:
>>
><snip>
>>
>>
>Don't print addresses using %d. Addresses are pointer values, so use %p.
>>
><snip>
>>
>>Some times the when you print addresses using %d it will show as
>>negative,
>>negative,
>Don't print addresses using %d. Addresses are pointer values, so use %p.
Use %p *after* converting the value to void*.
<snip>
>Actually, %x takes an int, not a hex. C doesn't have a hex type.
Actually, %x takes an unsigned int.
d, i, o, u, x, X The int argument is converted to signed decimal ( d
or i ), unsigned octal ( o ), unsigned decimal ( u ), or unsigned
hexadecimal notation ( x or X );
Sure looks like int to me.
<snip>
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Leave a comment: