Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Abridged FAQ Question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Flash Gordon, post: 2448010"] fangshi wrote: Please don't top post. You response belongs after or intermixed with the text you are replying to. Top posting fixed. No you can't, at least not if you want code that is guaranteed to work. Your suggestion will fail on real systems. The correct way to print the value of a pointer is printf("%p",(void*)p); Your first suggestion [printf(p)] is, in general, a very bad idea. If p points to the string "99% rubbish" you have just invoked undefined behaviour and anything can happen, the most likely result being it not printing what you expected. Do you mean why an address isn't printed? If so, the answer is you have not told it to print an address. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Abridged FAQ Question
Top