Is a pointer, which points to 0 always invalid? The addresses are used for very specific things, right? So if a developer tried to define a pointer to a variable in his scope, it should always be invalid, right?
int main() {
int *ptr = (int *)0;
}
Is the address 0x0000
protected?
The reason I am asking is, because I have a struct with a union, and the values of the union can either be a double
equal to 0, or a pointer to another struct.