thank you dave. any idea how to handle such questions in placement papers? On Sep 22, 8:06 am, Dave <[email protected]> wrote: > @Himanshuarora: This code violates the sequence point rule (google > it), which essentially says that a variable can change values at most > one time between sequence points. Therefore, the output is compiler > dependent. > > Dave > > On Sep 21, 6:40 pm, him <[email protected]> wrote: > > > > > > > > >http://www.ideone.com/8iPGF > > > int main() > > { > > int i=5; > > printf("%d", ++i + ++i + ++i); > > return 0; > > > } > > > output : 22 > > > why 22? > > can anybody spell out the reasons and the general way in which the > > expression in evaluated in such cases?
-- 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.
