The Boolean OR expression, AKA logical OR expression, is used to compute the Boolean or of two integer values, considered as Boolean. In C, the Boolean OR operator short circuits, so Boolean OR expressions can also be used to control conditional execution.
The Boolean OR expression is used to compute the Boolean OR of two integer values, considered as Boolean values.
#include <stdio.h>
void Display (int A, int B);
int main () {
Display (0, 0);
Display (0, 1);
Display (1, 0);
Display (1, 1);
Display (2, 7);
Display (15, 22);
}
void Display (int A, int B) {
int C;
C = A || B;
printf ("%i || %i is %i\n", A, B, C);
}
| Boolean OR Operator | boolean-or-operator |
| Bitwise OR Expression | <bitwise-or-expression> |
| Boolean And Expression | <logical-and-expression> |
|
Boolean OR Expression
|
<boolean-or-expression> |