/* File: notop.c Demonstrate working principle of the negation operator ! */ #include int main() { double x = 4.0, y = 0; /* when the operand is an integer */ printf("!0 = %d\n", !0); printf("!1 = %d\n", !1); /* when the operand is a floating-point number */ printf("!0.0 = %d\n", !0.0); printf("!0.1 = %d\n", !0.1); /* when the operand is a variable */ printf("!x = %d\n", !x); printf("!y = %d\n", !y); /* when the operand is an expression */ printf("y > x = %d\n", y > x); printf("!(y > x) = %d\n", !(y > x)); return 0; }