4 ms·
It seems that 0 wasn't a usable address on PDP-11 so K&R decided it's fine to use it as null pointer constant. And of course dereferencing 0 isn't impossible i
by qb45 11y ago
It seems that 0 wasn't a usable address on PDP-11 so K&R decided it's fine to use it as null pointer constant.
And of course dereferencing 0 isn't impossible in practice on arches which support this. Compilers for such machines usually can be coerced to generate code which accesses 0, you just have to live with the fact that your code isn't considered "valid, portable C" anymore.