Addresses and Pointers
In order to derefernce a pointer, it must be known to which type it refers
Objects of different types may occupy spaces of different size, e.g. char, int, float, double. Example:char c[N]; char *pc = &c[0] ; (*(pc+1)==c[1]); 0 1int i[N]; int *pi = &i[0]; (*(pi+1)==i[1]); 0 1double d[N]; double *pd = &d[0];(*(pd+1)==d[1]); 0 1
It is illegal to compare two pointers, unless they are known to point to a single object (e.g. an array), or NULL. Illegal comparisons are sometimes possible, but the results may be surprising.