What is (void*)0?
Answer: A
Correct answer: Representation of NULL pointer
(void*)0 is an integer constant expression of value zero cast to void *, which is precisely the definition of a null pointer constant. The NULL macro is typically defined as exactly this.
It is not merely "a void pointer" - the value matters as much as the type. Note also that the null pointer's internal representation need not be all-zero bits on every machine; what the standard guarantees is that this constant converts to a null pointer of any type.
Please log in or register to report this question.