Dear all Sir:
I am confused between Legal address and none-Legal
address POINTER. For example below:
int *pt = NULL; /* pt does not hold a legal address */
int *q = &a; /* q hold a legal address */
printf("address of pt is %p", pt);
printf("address of a is %p", &a);
printf("address of q is %p", q);
But when run this code segment, pt holds a perfect memory address. Why many books say that the case
int *pt = NULL hold none-legal address?
In this scenerio, What non-legal address mean?
Any C experts can explain concisely about this.
Thanx for a million.