@ anand: I didn't understand
in printf, u r evaluating the values frm right to left n thn while printing,
u hv to print the evaluated values, y u r again evaluating the values while
u r printing frm left to right??

as in,  u said-
"Now it try to display the value from left to right which makes a++ as 13,
then a has 14 and ++a as 14"

so it has to be....acc. to u....a++ as 13, thn a as 14 and thn ++a shd b 15
thn.

On Mon, Feb 7, 2011 at 11:01 AM, jagannath prasad das
<jpdasi...@gmail.com>wrote:

> @juver:in f(a)+f(b) i guess f(a) is evaluated first because fucntion calls
> are evaluated from left to right
>
>
> On Mon, Feb 7, 2011 at 10:37 AM, Anand <anandut2...@gmail.com> wrote:
>
>> a++ when it gets printed. it is 13 and now it gets increment to 14. So now
>> if you print a it will 14.
>>
>>
>> On Sun, Feb 6, 2011 at 9:04 PM, jagannath prasad das <jpdasi...@gmail.com
>> > wrote:
>>
>>> @anand:while printing post fix gave 13 but rest two why 14
>>>
>>> On Mon, Feb 7, 2011 at 10:28 AM, Anand <anandut2...@gmail.com> wrote:
>>>
>>>> int a=10,b;
>>>> b=a++ + ++a; (Till here I think it is clear the value of a is 12 and b =
>>>> 22)
>>>> printf("%d,%d,%d,%d",b,a++,a,++a);   (Evaluate from right to left. So
>>>> ++a makes the value of a as 13, then a  and then a++ which is post 
>>>> increment
>>>> still makes a as 13)
>>>> Now it try to display the value from left to right which makes a++ as
>>>> 13, then a has 14 and ++a as 14
>>>>
>>>> I hope it is clear.
>>>>
>>>>
>>>> On Sun, Feb 6, 2011 at 8:40 PM, jagannath prasad das <
>>>> jpdasi...@gmail.com> wrote:
>>>>
>>>>> ya i also want the explaination of gcc compiler output.......thanx in
>>>>> advance
>>>>>
>>>>> On Sun, Feb 6, 2011 at 10:13 AM, tech rascal 
>>>>> <techrascal...@gmail.com>wrote:
>>>>>
>>>>>> but can nybody explain why the output is coming like this on gcc
>>>>>> compiler??
>>>>>> On Sun, Feb 6, 2011 at 10:04 AM, Manish Verma <monsieur....@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>>
>>>>>>> i think juver has explained
>>>>>>> On Feb 5, 9:34 pm, jagannath prasad das <jpdasi...@gmail.com> wrote:
>>>>>>> > @manish:can you explain with the example of a specific compiler...
>>>>>>> >
>>>>>>> > On Sat, Feb 5, 2011 at 10:02 PM, jagannath prasad das
>>>>>>> > <jpdasi...@gmail.com>wrote:
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > > @ankit:ans is 22 13 14 14 in gcc compiler.............
>>>>>>> >
>>>>>>> > > On Sat, Feb 5, 2011 at 7:24 PM, Manish Verma <
>>>>>>> monsieur....@gmail.com>wrote:
>>>>>>> >
>>>>>>> > >> answer will depend on your compiler.....
>>>>>>> >
>>>>>>> > >> On Feb 5, 1:02 am, jagannath prasad das <jpdasi...@gmail.com>
>>>>>>> wrote:
>>>>>>> > >> > *#include<stdio.h>
>>>>>>> > >> > void main(void)
>>>>>>> > >> > {
>>>>>>> > >> > int a=10,b;
>>>>>>> > >> > b=a++ + ++a;
>>>>>>> > >> > printf("%d,%d,%d,%d",b,a++,a,++a);
>>>>>>> >
>>>>>>> > >> > }
>>>>>>> >
>>>>>>> > >> > *what is the answer?how are the function parameters passed on
>>>>>>> the stack?
>>>>>>> >
>>>>>>> > >> --
>>>>>>> > >> 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
>>>>>>> <algogeeks%2Bunsubscribe@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.
>>>>>
>>>>
>>>>  --
>>>> 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.
>

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