4 ms·
The literal 0 in a pointer context will be converted to a NULL pointer, which can be a non-zero bit pattern (there are some systems where the actual NULL pointe
by spc476 7y ago
The literal 0 in a pointer context will be converted to a NULL pointer, which can be a non-zero bit pattern (there are some systems where the actual NULL pointer isn't all zeros). Going through a variable might not do what you think. So this:
char *p = 0;
is fine, but
intptr_t a = 0;
char *p = (char *)a;
might not do what you expect (set p to the NULL pointer).