NullIs a macro defined as a null pointer in the header file <stddef. h>. Nul is the name of the first character in the ASCII character set. It corresponds to a zero value. The C language does not contain predefined macros such as NUL. Note: In the ASCII character set, digit 0 corresponds to a decimal value of 48. Do not mix digits 0 with '/0' (NUL) values.
NullCan be defined(Void *) 0, AndNulCan be defined'/0'. Both null and NUL can be simply defined as 0. They are equivalent and can be used interchangeably, but this is an undesirable method. To make the program read clearer and easier to maintain, you should define null as the pointer type and NUL as the character type in the program.
You can obtain the value of a pointer by performing the unreferencing operation. From the definition, the NULL pointer does not point to anything. Therefore, it is invalid to unreference a null pointer. Before unreferencing a pointer, make sure it is not a null pointer.