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 |
How can a '::' operator be used as unary operator?
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
Why do we use classes in programming?
What are the different operators in C++?
Why should you learn c++?
What is purpose of abstract class?
Write a recursive program to calculate factorial in c++.
Is c++ harder than java?
What is the full form of india?
What is the use of default constructor?
How to demonstrate the use of a variable?
What is the best c c++ compiler for windows?