This is only true in C, which is part of why C is less insane than C++.
The two languages should not be conflated anymore.
The two languages should not be conflated anymore.
6.3.2.3 Pointers
3. An integer constant expression with the value 0, or such an expression cast to type void *,
is called a null pointer constant. If a null pointer constant is converted to a pointer type,
the resulting pointer, called a null pointer, is guaranteed to compare unequal to a pointer
to any object or function.
4. Conversion of a null pointer to another pointer type yields a null pointer of that type.
Any two null pointers shall compare equal.
Looking at the definition of NULL: 7.17 Common definitions <stddef.h>
3 The macros are
NULL
which expands to an implementation-defined null pointer constant;
Meaning that NULL is implementation defined, but is assured by the standard to compare equal to any 0-valued pointer of any type, even if it is itself another special value.