b=--a--; this will result into compiler error because 1st the post
decrement will occur and value will be saved in a temp variable . but
you cannot apply pre decrement on temp variable.

On 7/8/12, vindhya chhabra <vindhyachha...@gmail.com> wrote:
> int a=10;
> int b;
> b=--a--;
> printf("%d %d",a,b);. l value error in this ques..
>
> On Sun, Jul 8, 2012 at 11:48 PM, vindhya chhabra
> <vindhyachha...@gmail.com>wrote:
>
>> .i think there will be an error in this -l value required, as post
>> increment has more precedence than pre increment
>>
>>
>> On Sun, Jul 8, 2012 at 11:44 PM, ashish jain
>> <ashishjainco...@gmail.com>wrote:
>>
>>> I think it should output:
>>> 9 9
>>>
>>>
>>> On Sun, Jul 8, 2012 at 11:42 PM, md shaukat ali
>>> <ali.mdshau...@gmail.com>wrote:
>>>
>>>> but i am confused in this problem...
>>>> int a=10;
>>>> int b;
>>>> b=--a--;
>>>> printf("%d %d",a,b);..what will output?
>>>>
>>>>
>>>> On Sun, Jul 8, 2012 at 11:39 PM, md shaukat ali
>>>> <ali.mdshau...@gmail.com
>>>> > wrote:
>>>>
>>>>> agree with adarsh
>>>>>
>>>>>
>>>>> On Sun, Jul 8, 2012 at 10:39 PM, adarsh kumar
>>>>> <algog...@gmail.com>wrote:
>>>>>
>>>>>> Sorry, its 6/6 and not 6/5,
>>>>>>
>>>>>> regds.
>>>>>>
>>>>>> On Sun, Jul 8, 2012 at 10:39 PM, adarsh kumar
>>>>>> <algog...@gmail.com>wrote:
>>>>>>
>>>>>>> Firstly, this is ambiguous and expressions with multiple
>>>>>>> increment/decrement operators will get executed according to the
>>>>>>> compiler.
>>>>>>>
>>>>>>> Even if you consider the normal way, as we(humans) percieve it, it
>>>>>>> will be evaluated as
>>>>>>> (++i)/(i++), which is 6/5, which is 1.
>>>>>>>
>>>>>>> Simple!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Jul 8, 2012 at 10:23 PM, rahul sharma <
>>>>>>> rahul23111...@gmail.com> wrote:
>>>>>>>
>>>>>>>> int i=5;
>>>>>>>> i=++i/i++;
>>>>>>>> print i;
>>>>>>>>
>>>>>>>>
>>>>>>>> i=1
>>>>>>>>
>>>>>>>> how?
>>>>>>>>
>>>>>>>> --
>>>>>>>> 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.
>>>
>>
>>
>>
>> --
>> Vindhya Chhabra
>>
>>
>>
>>
>
>
> --
> Vindhya Chhabra
>
> --
> 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