6.5.13 Logical AND operator

Previous Table of Contents

1238

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

1239 Each of the operands shall have scalar type.

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

1241 otherwise, it yields 0.

1242 The result has type int.

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

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

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

Next

Created at: 2005-06-29 02:19:00 The text from WG14/N1124 is copyright © ISO