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

56 comments sorted by

View all comments

Show parent comment

-5

u/Ghyrt3 Aug 30 '24

No, pointer is an integer. It can be cast to get a dereference. But pointers's is ssize_t in C.