If an expression evaluates multiple &&
operators, and does not evaluate any operators of lower precedence (eg. ||
, ?:
), will the expression evaluate to 0 as soon as one of the &&
s return 0, or will it finish evaluating the remaining &&
s?
For example,
q=0; w=1; e=1; r=1;
if(q && w && r && e) {}
Will this if()
evaluate to false as soon as q && w
evaluates to 0 (since the remaining &&
must all evaluate to 0 regardless of the right hand operators)?