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 are static type checking?
What are the basics of local (auto) objects?
Why is standard template library used?
What language is a dll written in?
write a function signature with various number of parameters.
What is c++ try block?
i want to know how to copy arrary without using any method or function. I have tried the below using System; class e4 { static void Main(string[] args) { int a,b; int[ ] m= new int[5]; int[ ] n= new int[5]; for(a=0;a<=4;a++) { Console.WriteLine("enter any value"); m[a]=Convert.ToInt32(Console.ReadLine()); m[a]=n[a]; } for(b=0;b<=4;b++) { Console.WriteLine(n[b]); } } } but it will give wrong result can anyone solve this problem
What are guid? Why does com need guids?
What is the use of lambda in c++?
Please explain class & object in c++?
Can we delete this pointer in c++?
When should overload new operator on a global basis or a class basis?