Logical Operators in C

C provides three logical operators when we test more than one condition to make decisions. These are: && (meaning logical AND), || (meaning logical OR) and ! (meaning logical NOT).

Source Code

//Logical Operators
int main()
    int a=32; //>=35 and(&&) <=100
    printf("\nLogical And : %d",(a>=35 && a<=100));
    printf("\nLogical Or  : %d",(a>=35 || a<=100));
    printf("\nLogical Not : %d",!(a>=35));
    return 0;
To download raw file Click Here


Logical And : 0
Logical Or  : 1
Logical Not : 1

List of Programs

Sample Programs

Switch Case in C

Conditional Operators in C

Goto Statement in C

While Loop Example Programs

Looping Statements in C

For Loop Example Programs

Array Examples in C

One Dimensional Array

Two Dimensional Array in C

String Example Programs in C

Functions Example Programs in C