Programming|in|C|Operator


 #include <stdio.h>

int main() {
    int a = 1;
    int b = 0;
    
                int logicalAnd = (a && b);
                int logicalOr = (a || b);
                int logicalNotA = !a;
    int logicalNotB = !b;
    
    printf("Logical AND: %d\n", logicalAnd);
    printf("Logical OR: %d\n", logicalOr);
    printf("Logical NOT of a: %d\n", logicalNotA);
    printf("Logical NOT of b: %d\n", logicalNotB);
    
    return 0;
}
error: Content is protected !!
Open chat
1
Hi,how Can We Help You ?