CodePudding user response:
We know that the integer as logic, nonzero is true, zero is false;Whereas the logic value as an integer, the true value of 1, false value is 0;
Logical operators & amp; & And | | in the left operand can determine the result when short circuit skip right operand,
CodePudding user response:
C is the result of the true and false, 0 for false and 1 is true,Note | | if | | to the left of the expression is true, | | behind the expression will not perform; So called short circuit value;
So b=2 do not perform, so b=5,