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.

Reply via email to