Hi LiGang,
I hope this little example is helpfull:
// show address and contents of variable and array
#include <stdio.h>
void main(){
int v=5,ap[3]={1,2,3}; // Variable and ArrayPointer
printf("\nVar : 0x%X -> %d",&v,v); // var address and contents
printf("\nArp : 0x%X -> 0x%X",&ap,ap); // array address and contents
printf("\nVar=%d and Arp=0x%X",*&v,*&ap); // var and ap contents
;}
Teletep
--- In [email protected], LiGang <[EMAIL PROTECTED]> wrote:
>
> Hi C gurus,
>
> I have some questions about the address of an array, Please look at
the
> following simple code:
>
> ===================================================
> #include <stdio.h>
>
> int main(void)
> {
> int inter[3]={1,2,3};
>
> printf("inter is %p_____and &inter is %p\n",inter,&inter);
> printf("*&inter is %d\n",*&inter);
> printf("*inter is %d\n",*inter);
>
> return 0;
>
> }
> ===================================================
>
> Clearly, inter==&inter, but why *inter and *&inter is not identical?
>
> Thanks!
>
> ---
> LiGang
>
>
> [Non-text portions of this message have been removed]
>