@sagain:in dev c it is #s Zi On Sat, Jul 16, 2011 at 3:35 PM, Ankur Khurana <ankur.kkhur...@gmail.com>wrote:
> I am using MinGW compiler (codeblocks , out put is 788 and not 678 . Its > compiler dependent so , let us leave it that way only..... > > > On Sat, Jul 16, 2011 at 3:27 PM, shiv narayan > <narayan.shiv...@gmail.com>wrote: > >> according to me it processing is done from righ to left .first right >> most a would be incremented and then from righ to left >> for first question answer should be 8+7+6=21 >> and for 2nd it should be >> >> (8)+(7)*10+(6)*100=678 >> >> On Jul 15, 1:15 pm, Antony Kotre <antonyko...@gmail.com> wrote: >> > can any tell and explain the output of following code >> > >> > #include<stdio.h> >> > main() >> > { int a =5, b=5; >> > int res1=(++a)+(++a)+(++a); >> > int res2=(++b)+(++b)*10+(++b)*100; >> > >> > printf("%d\n%d\n",res1,res2); >> > >> > >> > >> > >> > >> > >> > >> > } >> >> -- >> 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. > -- Regards, Kamakshi kamakshi...@gmail.com -- 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.