i=-3 it gets incremented to -2 (++i)
m is evaluated and as ++i is non zero it evaluates to TRUE and m is
assigned value 1, hence remaining part is not executed , so j and k is not
incremented.
On Tue, Jun 12, 2012 at 2:19 AM, Dave dave_and_da...@juno.com wrote:
This is the result of
[mailto:algogeeks@googlegroups.com] On
Behalf Of nadeem khan
Sent: Tuesday, June 12, 2012 6:39 AM
To: algogeeks@googlegroups.com
Subject: Re: [algogeeks] Re: Can anyone explain this strange behavior ?
i=-3 it gets incremented to -2 (++i)
m is evaluated and as ++i is non zero it evaluates
Nope ,the output is correct.as I had studied somewhere ,i don't remember
where exactly but
in (x||y) type condition's,if x evaluates to true( non zero) then value of
y doesn't matter and is not evaluated and condition turns out to be true
anyhow without even checking y ,control never goes to y and
Easy Buddy.. this is primary thing.. Surprise to know that ppls still don't
knw abt this..
for OR:-
if left expr evaluate non zero it won't compute right side.
For And:-
if left expr evalute zero , it won't compute right side
Prem
On Tue, Jun 12, 2012 at 11:10 AM, sengar.mahi