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 many ways are there to initialize an int with a constant?
Is c++ vector dynamic?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
What is Namespace?
What is size of a object of following class? class Foo { public: void foo(){} }
Define upcasting.
How will you call C functions from C ++ and vice-versa?
0 Answers Agilent, Tavant Technologies, Thomson Reuters, Verifone,
What is the use of ::(scope resolution operator)?
What is an inclusion guard?
What is a constructor in c++ with example?
What are c++ stream classes?
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.