[Quote]

arr has the address to the base of an array of three int's.

&arr is the address of the first element of that same array.

[/Quote]

^^ Found on web.

check the difference by printing arr+1 and &arr+1. The former will skip one
element, but later will skip the whole array.
On 12 August 2011 18:41, monish001 <[email protected]> wrote:

> Program:
> int arr[] = {12, 14, 15, 23, 45};
> printf("%u %u\n", arr, &arr);
>
> Question: Why arr == &arr ?
>
> Comments:
> 1. arr is a variable that stores the address of location where arr[0]
> resides. Complier shows &arr and arr having same value. Shouldn't &arr
> be the address where arr resides?
>
> Thanks
> Monish
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
___________________________________________________________________________________________________________

Please do not print this e-mail until urgent requirement. Go Green!!
Save Papers <=> Save Trees

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to