--- In [email protected], "Paul Herring" <[EMAIL PROTECTED]> wrote:
>
> On Sun, Sep 28, 2008 at 6:38 AM, Asim Mian <[EMAIL PROTECTED]> wrote:
> > In both the cases answer will be 10.....
> 
> Not every time it won't. You're still invoking undefined behaviour.

...so it might :-)

I know what you mean, but of course unless you have a sadistic
compiler, unfortunately it *is* likely you will get the same result
every time you run it. It would be much better if it gave a random answer.

gcc does at least give you a clue:

warning: operation on `x' may be undefined

Reply via email to