Monday, 25 April 2016

Different types of NULL usage and their meaning in program

No comments:
NULL is an pre-processor macro which may contain the following definition.

#define NULL 0

‘\0’ is an ascii character and equivalent ascii value is 0

“\0”  is an string which is null terminated.

int main()

   char *null_1=NULL;
   char *null_2='\0';
   char *null_3="\0";

   return 0;


No comments:

Post a Comment