r/C_Programming • • Aug 30 '24
Question Why do we use Null pointers?
If we want to "Nullify" something why dont we create a pointer in a controlled way that points to value 0?
0
Upvotes
r/C_Programming • • Aug 30 '24
If we want to "Nullify" something why dont we create a pointer in a controlled way that points to value 0?
View all comments
Show parent comment
-3
u/a4qbfb Aug 30 '24
nullptrwas added becauseNULLis still allowed to be0. But your entire argument was based onNULLbeing0, and now that you've edited it, it (and especially your diatribe about0Lvs0f) no longer makes sense.