Re: NULL and HEAP in C
Not always. That's *normally* the case, but in terms of the actual value, the C standard does not specify that NULL must be zero. It only states that the integer value 0, when cast to a pointer, will be NULL. It does not state however that when NULL is cast back to an integer that the result must be 0.
Originally Posted by karlson
The actual memory address pointed to by NULL could be any unavailable address. In practice this is usually 0, but you shouldn't rely on that.
In C there's also a second null, the '\0' character, used to terminate strings. However, the string null, and the NULL pointer are not the same thing, despite using the same name.
GCS/O d+(-@) s: a-->? C(++) UL P+ L+++@ E@
W++$ N++ !o K++ w(++) !O M(-) !V PS+(++)
PE-() Y+ PGP++ t++(+++@)* 5++ X++@ R+++@
tv+ b++(+++) DI++ D+ G+ e++>++++ h- r y?