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 |
Describe new operator and delete operator?
Implement a 2 dimensional array by one dimentional array
What is abstraction in c++?
What do you understand by zombie objects in c++?
What about Virtual Destructor?
What is #include cmath?
What is the best way to take screenshots of a window with c++ in windows?
What is void pointer in c++ with example?
What happens if an exception is throws from an object's constructor and from object's destructor?
How is objective c different from c++?
What is this weird colon-member (" : ") syntax in the constructor?
Define 'std'.