y=*x++;
this line executes like this:

y=*x;
x=x+1; // post increment

Regards
Anantha Krishnan

On Mon, Jul 4, 2011 at 10:36 AM, amit kumar <amitthecoo...@gmail.com> wrote:

> i think d answer sud be 10.
> but it comes out to be 5.
> xplain plz
>
>
> On Mon, Jul 4, 2011 at 10:30 AM, Sandeep Jain <sandeep6...@gmail.com>wrote:
>
>> Apoorve, please explain the reason for this output as well
>>
>>
>> Regards,
>> Sandeep Jain
>>
>>
>>
>>
>>
>> On Mon, Jul 4, 2011 at 1:06 AM, Apoorve Mohan <apoorvemo...@gmail.com>wrote:
>>
>>> 5
>>>
>>>
>>> On Mon, Jul 4, 2011 at 1:01 AM, amit the cool 
>>> <amitthecoo...@gmail.com>wrote:
>>>
>>>> int main()
>>>> {
>>>>        int a[]={5,10,15,8};
>>>>        int *x=a;
>>>>        int y;
>>>>        y=*x++;
>>>>        printf("%d",y);
>>>> }
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>>
>>>
>>>
>>> --
>>> regards
>>>
>>> Apoorve Mohan
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> 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 algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> 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 algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to