3 ms·
(void *) 0 is a null pointer constant and is not necessarily an all zeros representation. This has been defined virtually forever. https://c-faq.com/null/null2
by pxx 3y ago
(void *) 0 is a null pointer constant and is not necessarily an all zeros representation. This has been defined virtually forever.
https://c-faq.com/null/null2.html https://c-faq.com/null/null2.html
https://c-faq.com/null/machexamp.html https://c-faq.com/null/machexamp.html
Actual ways to do what you want to do are described in
https://c-faq.com/null/accessloc0.html https://c-faq.com/null/accessloc0.html
but technically speaking the pointer with a constant zero assigned to it _is_ a null pointer (which can be implemented as whatever bit pattern), independent of the preprocessor macro.