3 ms·
The address is still 3 which has valid applications. C is permissive enough to run on platforms that don't use address 0 for NULL. With pointer operations the c
by kevin_thibedeau 3y ago
The address is still 3 which has valid applications. C is permissive enough to run on platforms that don't use address 0 for NULL. With pointer operations the compiler will change the encoding from 0 to that platform's NULL address.
int *p = 0;
intptr_t i = (intptr_t)p;
if(i == 0) ... // Isn't always true