6.5.13 Logical AND operator

Previous Table of Contents "New C Standard" commentary

1248

logical-AND-expression:
                inclusive-OR-expression
                logical-AND-expression && inclusive-OR-expression

1249 Each of the operands shall have scalar type.

1250 The && operator shall yield 1 if both of its operands compare unequal to 0;

1251 otherwise, it yields 0.

1252 The result has type int.

1253 Unlike the bitwise binary & operator, the && operator guarantees left-to-right evaluation;

1254 there is a sequence point after the evaluation of the first operand.

1255 If the first operand compares equal to 0, the second operand is not evaluated.

Next

Created at: 2008-01-30 02:39:43 The text from WG14/N1256 is copyright © ISO