I am learning to code in C++ and came across null ptr. The book i read says that null pointers can not be dereferenced. That makes sense because there is nothing to dereference. But my question is that if null pointers can not be dereferenced then what is the point of having them in the context of defining a variable that you are not ready to initialize. Meaning if I am writing a program as follows:
int h =10;
int* h_pointer = &h;
int z = 123;
int* z_pointer = nullptr;
Why have the null pointer, if I can not change the value of later from null to &z.