Is NULL always zero in C?

I’m assuming you mean the null pointer. It is guaranteed to compare equal to 0.1 But it doesn’t have to be represented with all-zero bits.2

See also the comp.lang.c FAQ on null pointers.


  1. See C99, 6.3.2.3.
  2. There’s no explicit claim; but see the footnote for C99, 7.20.3 (thanks to @birryree in the comments).

Leave a Comment