6.5.14 Logical OR operator
Syntax
logical-OR-expression:
logical-AND-expression
logical-OR-expression || logical-AND-expression
Constraints
Each of the operands shall have scalar type.
Semantics
The || operator shall yield 1 if either of its operands compare unequal to 0; otherwise, it yields 0. The result has type int.
Unlike the bitwise | operator, the || operator guarantees left-to-right evaluation; there is a sequence point after the evaluation of the first operand. If the first operand compares unequal to 0, the second operand is not evaluated.