This will be same as: b=b+1; b=b+1; a=b*b; Basically, all prefix increment and decrement operators will be executed first. Similarly all postfix operators will be executed at last.
Anuj Agarwal Engineering is the art of making what you want from things you can get. On Wed, Jun 1, 2011 at 5:27 PM, Vishal Thanki <[email protected]>wrote: > you may want to read: http://c-faq.com/expr/seqpoints.html > > On Wed, Jun 1, 2011 at 5:19 PM, himanshu kansal > <[email protected]> wrote: > > a=++b*++b; > > if b=3 initially, then a is coming out to be 25.....why???? > > > > -- > > 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. > > > > > > -- > 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. > > -- 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.
