Tuesday, June 11, 2019

null pointer in c

#include <stdio.h>

int main () {

   int  *ptr = NULL;
   printf("The value of ptr is : %x\n", ptr  );
   return 0;
}


output:::



little change in program:

#include <stdio.h>

int main () {

   int  *ptr = NULL;
   printf("The value of ptr is : %d\n", ptr  );
   return 0;
}
out put is same as above.

No comments:

Post a Comment

python class topic video