/************************************************
* File: logicaland.cpp
* Description: Program to show examples
* of the Boolean AND
* Date: 11/25/08
************************************************/
#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; /* Boolean AND */
printf ("%i && %i is %i\n", A, B, C);
}
| Boolean AD Operator | boolean-and-operator |
| Bitwise AND Expression | <bitwise-and-expression> |
| Boolean OR Expression | <boolean-or-expression> |