by blirio · 2y ago · 0 comments
That's true for the literal constant 0. For 0 in a variable it is not necessarily true. Basically when a literal 0 is assigned to a pointer or compared to a pointer the compiler takes that 0 to mean whatever bit pattern represents the null pointer on the target system.
It's not guaranteed that NULL is 0.
Still, I don't think you'd find a counterexample in the wild these days.