"!" In c language, it is not an operator. If used before a variable, a non-operational expression is constructed, and the return result of the expression is a Boolean value (that is, only true or false). When using a variable, if it is not a Boolean data type, it will be cast to a Boolean type for reuse. For example, the integer variable 123 will be converted to true and the integer variable 0 will be converted to false.
Extended data:
List of all operators in C language:
1, arithmetic operator
Used for various digital operations, including addition (+), subtraction (-), multiplication (*), division (/), remainder (or modular operation,%), self-increasing (++) and self-decreasing (-) * *.
2. Relational operators
Used for comparison operations, including operations greater than (>) and less than (=).
, less than or equal to (
3. Logical operators
Used for logical operations, including and (&; &), or (||), not (! ) three kinds.
4, bit operator
The quantities involved in the operation are calculated by binary bits. Includes a bit sum (&; ), bitwise OR (|), bitwise NOT (~), bitwise XOR () and left shift (>).
5. Assignment operator
Used for assignment operation, which is divided into simple assignment (=), compound arithmetic assignment (+=,-=, * =,/=,% =) and compound bit operation assignment (&; =,|=,^=,>; & gt=,<& lt=) There are three kinds of * * * eleven kinds.
Baidu encyclopedia -c language operation symbol