On Thu, Sep 3, 2009 at 12:53 PM, Akash Goswami<[email protected]> wrote: > #include<stdio.h> > #include<conio.h> > int main() > { > int m=1; > m=m++ + m++ + ++m + ++m;
Undefined behaviour. Doing this in C or C++ does not give a predictable result, regardless of what any other posters say in reply to your message to the contrary. See http://c-faq.com/expr/evalorder2.html > printf("%d", m); > getch(); > } -- PJH http://shabbleland.myminicity.com/ http://www.chavgangs.com/register.php?referer=9375 http://www.kongregate.com/?referrer=Shabble
