dreferencing 2 d array

Posted by ashish-sangwan on Stack Overflow See other posts from Stack Overflow or by ashish-sangwan
Published on 2010-05-27T17:06:04Z Indexed on 2010/05/27 17:11 UTC
Read the original article Hit count: 165

Filed under:
|

Please look at this peice of code :-

#include<stdio.h>
int main()
{
int arr[2][2]={1,2,3,4};
printf("%d %u %u",**arr,*arr,arr);
return 0;
}

When i compiled and executed this program i got same value for arr and *arr which is the starting address of the 2 d array. For example:- 1 3214506 3214506

My question is why does dereferencing arr ( *arr ) does not print the value stored at the address contained in arr ?

© Stack Overflow or respective owner

Related posts about arrays

Related posts about 2d