Logical negation operator ('!')

Previous Unary operators Next

In the expression

! expr
the expr operand must be of scalar type (i.e. not an array, a structure or an union). The result is of type int and is the logical negation of the operand: The expression '!expr' is equivalent to '(0 == expr)'.