basically it depend upon the way the parameters arre called ...it varies from one compiler to other....
On Sat, Nov 6, 2010 at 9:50 PM, Shalini Sah <[email protected] > wrote: > 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 <[email protected]> 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 <[email protected]> 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<algogeeks%[email protected]> >> . >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- yezhu malai vaasa venkataramana Govinda Govinda -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
