#53_NULL Pointer in C

 # include <stdio.h>


int main()
{
    int a;
    a=5;
    intptr=NULL;//null pointer 
    // ptr=&a;//no longer null pointer
    if (ptr==NULL)
    {
        printf("The pointer is NULL\n");
    }
    else
    {
        printf("The pointer is :%d\n", *ptr);
    }
    
    
    return 0;
}

Comments

Popular posts from this blog