The answr is 3. Arrays can have negative elements. The address is the
address of base - address of int.

On Wed, Dec 15, 2010 at 10:56 PM, siva viknesh <[email protected]>wrote:

> main()
> {
>  int a[5]={1,3,6,7,0};
>  int *b;
>  b=&a[2];
>  cout<<b[-1];
> }
>
> the value of b[-1] is
> a.1
> b.3
> c.-6
> d.none
>
> give me the answer and explain why ??
>
> --
> Regards,
> $iva
>
>  --
> 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]<algogeeks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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