int *p = NULL;
printf("%1d",p) ;
what will be the output of this above code?
Answer Posted / 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 |
Post New Answer View All Answers
What is protected inheritance?
What are the data types in c++?
What are the two types of polymorphism?
What do you mean by inheritance in c++?
Do you know what are pure virtual functions?
what are the iterator and generic algorithms.
Distinguish between a # include and #define.
What are exceptions c++?
Distinguish between new and malloc and delete and free().
Can java be faster than c++?
Describe the advantage of an external iterator.
What is the best c++ compiler?
Write syntax to define friend functions in C++.
Do vectors start at 0 c++?
What are the steps in the development cycle?