int *p = NULL;
printf("%1d",p) ;
what will be the output of this above code?
Answers were Sorted based on User's Feedback
Answer / vasanth
Ans : 0
Since the pointer is having NULL Address,when we try to
print like printf("%1d",*p) it will be giving the exception
hence windows will not accept NULL pointer.
Use cout<<p; then we can print NULL address 0x00000000
Note: the ans is based on VC++ compiler.
| Is This Answer Correct ? | 18 Yes | 0 No |
What data encapsulation is in c++?
What is the difference between inline functions and macros?
Are strings immutable in c++?
Which bitwise operator is used to check whether a particular bit is on or off?
When there is a global variable and local variable with the same name, how will you access the global variable?
What are structs in c++?
Explain bubble sorting.
Explain the isa and hasa class relationships. How would you implement each?
What is c++ coding?
Should you pass exceptions by value or by reference?
Is eclipse good for c++?
Can you please explain the difference between overloading and overriding?