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 at > http://groups.google.com/group/google-code?hl=en. > > -- 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.
