logical operators in c
#include <stdio.h>
int main() {
int a = 5, b = 10, c = 15;
// Logical AND Operator (&&)
if (a > 0 && b > 0) {
printf("Both a and b are greater than 0\n");
}
// Logical OR Operator (||)
if (b > 0 || c > 0) {
printf("At least one of b and c is greater than 0\n");
}
// Logical NOT Operator (!)
if (!(a < 0)) {
printf("a is not less than 0\n");
}
return 0;
}