study of a null pointer.

#include <stdio.h>

int main(void)
{
int *ip, num = 100;

ip = NULL;

if(ip == NULL)
{
printf("\nip does not point to anything. num = %d", num);
}

ip = &num;

if(ip != NULL)
{
printf("\nip points to num. num = %d\t*ip = %d", num, *ip);
}


return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin