|
|
|
|
Download e-Books
Aptitude Interview Questions
Online Quiz
|
Home > C Interview Questions > How do you print an address?
The safest way is to use printf() (or fprintf() or sprintf()) with the %P specification. That prints a void pointer (void*). Different compilers might print a pointer with different formats.
Your compiler
will pick a format that’s right for your environment. printf( %Pn, (void*) buffer );
|