Original Post
I just need to know if I'm thinking this through correctly. Given two pieces of code: ------------------------------------ Code snippet 1: #include void main() { char buffer[5] = {0,1,3,5,7}; char *pbuffer; pbuffer = buffer; printf("%d\n", *pbuffer); printf("%d", *(pbuffer + 4)); } ------------------------------------ Code snippet 2: #include void main() { char buffer[5] = {0,1,3,5,7}; char *pbuffer = buffer; printf("%d\n", *pbuffer); printf("%d", *(pbuffer + 4)); } ------------------------------------ Both of these bits of code yield the same result (on my compiler). Ok, note the bits in bold, namely: char *pbuffer; pbuffer = buffer; and char *pbuffer = buffer; buffer here can mean two very subtley different (but the same) things. It can be treated as a const pointer to buffer[0] or it can be viewed as the address of buffer[0] (i.e., &buffer[0]). In the case of pbuffer = buffer, I am simply assigning the address in the const pointer buffer to be copied into the location pbuffer. In the case of *pbuffer = buffer, the compiler recognizes that this is a pointer operation and simply "points" *pbuffer to the same thing the const pointer buffer is pointing to, namely, the first element of array buffer (and puts the address there just like in the first example). I'm trying to get at the subtle distiction that SEEMS apparent to me since I can have two slightly different expressions(pbuffer = buffer and *pbuffer = buffer) which have identical left-hand sides of the assignment aoperation and different right-hand sides and yet provide exactly the same result. So, I've gone on and on about what is likely dreadfully obvious to most people familiar with the situation here, but these tiny nuances are always my biggest problem (probably because I'm a math major). IF I don't have everything in its proper place in my head I dwell on it far longer than is healthy.