Explain Null Pointer and its use.Where to use it? How it can be implemented in C++?
Null Pointer is a pointer which doesn't pointing to any variable.It doesn't exists.It is always 0.
If you don’t have address to be assigned to pointer then you can use NULL.
In C++:
float *ptr { 0 };
Here ptr is NULL pointer.
Similarly ,you can use int,double etc.
Didn't get the answer.
Contact people of Talent-Object Oriented Programming directly by clicking here