On Wed, May 27, 2009 at 4:37 PM, Arvind Balodia <[email protected]> wrote: > Well if you are taking argument of left and right to > say that my reasons are wrong.
They're wrong, because you're denying that the real reason doesn't have any relevance. > well again Mr. > look > at the statement again > v=(m++)+(++m); <sigh> Done left to right: v = 5 + 6 Right to left v = 6 + 6 The compiler/resulting binary is free to choose which, _if_any_ of these two, it does - it is permitted to choose to do anything in this circumstance, meaning a result of 0 is possible. So there's 3 possible results for this expression. None of which is actually guaranteed. Here's another feasible (if unlikely) result: The program crashes. > And i think it is straight forward answer directly from the basic knoledge. Unfortunately, you're not using 'basic knowledge' since your basic knowledge about how C or C++ specifically handles (or rather doesn't handle) these sorts of situations appears to have some holes in it... -- PJH http://shabbleland.myminicity.com/com http://www.chavgangs.com/register.php?referer=9375
