On Aug 15, 10:25 pm, Paul Smith <[email protected]> wrote: > The behaviour of your code is undefined. > > That means you should never write code in this manner - there's no > need of multiple increment operations within the same expression. > > Paul Smith > > [email protected] > > > > > > > > On Sun, Aug 14, 2011 at 10:54 AM, sumon <[email protected]> wrote: > > #include<stdio.h> > > void main() > > { > > int j=2,k; > > k=++j + ++j + ++j; > > printf("%d",k); > > > } > > > In GCC compiler why is it giving 13?? > > > -- > > You received this message because you are subscribed to the Google Groups > > "google-codejam" 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 > > athttp://groups.google.com/group/google-code?hl=en.
yes.. i know, but i am checking the sequence of execution in a expression! k=++j + (++j + ++j); it gives 15! -- You received this message because you are subscribed to the Google Groups "google-codejam" 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/google-code?hl=en.
