How we declare and define a null pointer?

double *ptr = NULL;int *ptr = 0;string *ptr = 0;string *ptr = NULL;

Sweet! A null pointer can be of any type. We just have to set it equal to 0 or NULL.

Not quite! A null pointer can be of any type. We just have to set it equal to 0 or NULL.