Why is NULL/0 an illegal memory location for an object?

Posted by aioobe on Stack Overflow See other posts from Stack Overflow or by aioobe
Published on 2010-06-02T18:36:36Z Indexed on 2010/06/02 18:44 UTC
Read the original article Hit count: 223

Filed under:
|
|
|

I understand the purpose of the NULL constant in C/C++, and I understand that it needs to be represented some way internally.

My question is: Is there some fundamental reason why the 0-address would be an invalid memory-location for an object in C/C++? Or are we in theory "wasting" one byte of memory due to this reservation?

© Stack Overflow or respective owner

Related posts about c++

Related posts about c