What's the difference between a null pointer and a void pointer?

前端 未结 11 1603
甜味超标
甜味超标 2020-12-02 05:13

Whats the difference between a Null pointer & a Void pointer?

11条回答
  •  遥遥无期
    2020-12-02 05:44

    A null pointer points has the value NULL which is typically 0, but in any case a memory location which is invalid to dereference. A void pointer points at data of type void. The word "void" is not an indication that the data referenced by the pointer is invalid or that the pointer has been nullified.

提交回复
热议问题