NULL Pointers in C Programming

A pointer that is assigned NULL is called a null pointer. We must initialize NULL pointer during variable declaration.

A null pointer refers to pointer variable that does not point to a valid address.

Generally NULL pointer is used when you do not have an exact address to be assigned.

#include 
int main () 
{

   int  *ptr = NULL;

   printf("The value of ptr is : %d", ptr  );
 
   return 0;
}

OUTPUT

The value of ptr is : 0