#include <stdio.h>
int main(void)
{
int *nptr = 0; /* making nptr a NULL pointer */
char *cp = 0; /* making cp a NULL pointer */
float *fp = 0; /* making fp a NULL pointer */
printf("In exp. /"int *nptr = 0/"\n");
if (!nptr) /* test if nptr is NULL or not */
printf("nptr is a NULL pointer!\n\n");
else
printf("\nnptr is not a NULL pointer!\n\n");
printf("In exp. /"char *cp = 0/"\n");
if (!cp) /* test if cp is NULL or not */
printf("cp is a NULL pointer!\n\n");
else
printf("cp is not a NULL pointer!\n\n");
printf("In exp. /"float *fp = 0/"\n");
if (!fp) /* test if fp is NULL or not */
printf("fp is a NULL pointer!\n\n");
else
printf("fp is not a NULL pointer!\n\n");
return 0;
}