firstly evaluate all prefix forms..++a will become 6..then a++ will remain
6..a=7 because postfix form of a will make it so..hence the result
7+6+6=19..


On Sat, Nov 6, 2010 at 9:39 PM, Dave <dave_and_da...@juno.com> wrote:

> @Bipul21: This is nonstandard, so the results are compiler-dependent.
> It is improper to have more than one assignment to the same variable
> between synchronization points.
>
> Dave
>
> On Nov 6, 10:42 am, bipul21 <bipuljai...@gmail.com> wrote:
> > #include<stdio.h>
> > int main()
> > {
> >    int a=5;
> >         a=a+(a++)+(++a);
> >         printf("%d",a);
> >     return 0;}
> >
> > answer is 19 but how??
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@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