Re: clear the concept of 2D array and pointers
Hi,
s[0][0] gives the value stored in that array
&s[0][0] gives the address in which that value is stored
example:
int main()
{
int a[2][2]={10,20,
30,40};
printf("\n%d %d",a[0][0],&a[0][0]);
printf("\n%d %d",a[1][1],&a[1][1]);
return 0;
}
Hope this helps
Regards
Gayathri
On Mon, 17 Oct 2005 raj_abhishek007@rediffmail.com wrote :
>
>hi all, i am worry abt the concept of 2D array. Let s[5][2] is a 2D
>array. so what is the difference between s[0],s[1]..... and &s[0],
>&s[1].... .pls help me...bye
>
0 Comments:
Post a Comment
<< Home