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 is returning structurs from functions?Show an eg?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
What is size of string in c++?
What is #include iostream?
What is namespace std; and what is consists of?
Can we use clrscr in c++?
What is the output of the following 3D Array int arr[3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12}; what is the output for arr[2][1][0]?
6 Answers HCL, Integra, IPMC, ORG,
What is data hiding c++?
What are c++ files?
Write a C++ Program to Multiply two Numbers
What is the most powerful coding language?
What is c++ manipulator?