C examples for Operator:Logic Operator
The logical NOT operator, represented by !, is a unary operator since it applies to just one operand.
The logical NOT operator reverses the value of a logical expression: true becomes false, and false becomes true.
#include <stdio.h> int main(void) { int age = 6;//from ww w.jav a2 s .c o m if((!(age <= 12) && !(age >= 20))) { printf("result."); }else{ printf("else."); } return 0; }