boolean operators in C
#include <stdio.h>
int main() {
int a = 5, b = 10, c = 15;
// AND operator (&&)
if (a > 0 && b > 0) {
printf("Both a and b are greater than 0\n");
}
// OR operator (||)
if (b > 10 || c < 20) {
printf("Either b is greater than 10 or c is less than 20\n");
}
// NOT operator (!)
if (!(a == b)) {
printf("a is not equal to b\n");
}
return 0;
}