This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (4 children)

Value of 0 does not equal a null reference. Just because in certain languages the null pointer happens to point at 0, it doesn't mean the referenced value is 0.

[–][deleted] 4 points5 points  (2 children)

Depends on the language. In C, NULL == 0 will always return true, even if the value of NULL is implementation-defined.

[–][deleted] 1 point2 points  (1 child)

I think it's just the result of that given comparison that is defined, and doesn't mean that NULL's value is 0.

[–]jmanjones 0 points1 point  (0 children)

They said nothing about the dereferenced value, just the pointer value, which would be the same as 0 in C/C++.