Operators
Bitwise AND & OR
Print the result of bitwise AND and OR of two numbers.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Print the result of bitwise AND and OR of two numbers.
#include <stdio.h>
int main() {
int a = 6, b = 3; // 110 & 011
printf("AND: %d\n", a & b); // 010 = 2
printf("OR : %d\n", a | b); // 111 = 7
return 0;
}
AND: 2
OR : 7