Brijesh is right.....until u do the type casting it will show an error....

On Fri, Sep 16, 2011 at 5:57 AM, Pradip Singh <[email protected]> wrote:

> it will print 2,5
>
> On Fri, Sep 16, 2011 at 2:35 AM, Brijesh <[email protected]>wrote:
>
>>
>>>
>> On Friday, 16 September 2011 13:25:38 UTC+5:30, Anup wrote:
>>>
>>> #include<stdio.h>
>>> int main()
>>> {
>>> int a[5]={1,2,3,4,5};
>>> int *ptr=(&a + 1);
>>>
>>        int *ptr=(int *)(&a + 1);
>>
>>> printf("%d %d\n",*(a+1),*(ptr-1));
>>> return 0;
>>> }
>>>
>>> Find the output!
>>>
>>
>> Now it will print 2 5
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/algogeeks/-/4tXlbiojgm8J.
>>
>> 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.
>>
>
>  --
> 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.
>

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