6.5.14 Logical OR operator

Previous Table of Contents

1246

logical-OR-expression:
                logical-AND-expression
                logical-OR-expression || logical-AND-expression

1247 Each of the operands shall have scalar type.

1248 The || operator shall yield 1 if either of its operands compare unequal to 0;

1249 otherwise, it yields 0.

1250 The result has type int.

1251 Unlike the bitwise | operator, the || operator guarantees left-to-right evaluation;

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

1253 If the first operand compares unequal 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