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 does new do in c++?
difference between the c++ and c languages
Why cout is used in c++?
What is the difference between struct and class?
How a new operator differs from the operator new?
what are prototypes
Can we make any program in c++ without using any header file and what is the shortest program in c++.
What are arrays c++?
What does it mean to declare a member function as virtual?
Explain the advantages of using friend classes.
What is function prototyping? What are its advantages?
check whether a no is prime or not.