Original Post
hi people...i'm new here an i'd really appreciate your help... Please consider the following simple c program.(taken from a book) " #include int multi[2][4]; main() { printf("\nmulti = %u", multi); printf("\nmulti[0] = %u", multi[0]); printf("\n&multi[0][0] = %u\n", &multi[0][0]); return(0); } OUTPUT: multi = 1328 multi[0] = 1328 &multi[0][0] = 1328 " Now...What i'm wondering,is how all three output values are the same... I underestand that "multi"is a pointer to "multi[0]".Also,multi[0] is also array,which means that multi[0] is also pointer to the first element of the 2d array.(which is multi[0][0]) Finally the statement(&multi),would also give us an output value of 1328! (of course,although all three values will be the same,the actual value can vary..) As we also know,pointers are nothing more than variables that like all variables have to reside somewhere in memory... In the previous code example,the output values,imply that both pointers + the first element multi[o][o] reside in the same memory address... How is that possible???i can't really inderestand it... What i also know,is that arrays have a fixed size... So how is it possble that two pointers and an integer value have the same starting address??? I'm really confused...I'd really appreciate any answers... Thanks a lot.