In C, there appear to be differences between various values of zero -- NULL
, NUL
and 0
.
I know that the ASCII character
A byte with a value of 0x00
is, on the ASCII table, the special character called NUL
or NULL
. In C, since you shouldn't embed control characters in your source code, this is represented in C strings with an escaped 0, i.e., \0
.
But a true NULL is not a value. It is the absence of a value. For a pointer, it means the pointer has nothing to point to. In a database, it means there is no value in a field (which is not the same thing as saying the field is blank, 0, or filled with spaces).
The actual value a given system or database file format uses to represent a NULL
isn't necessarily 0x00
.