Home >Backend Development >C#.Net Tutorial >How to express not equal in C language?
is not equal to the relational operator in C language, its symbol is! =, consisting of two characters, an exclamation point and an equal sign, with no spaces in between.
The usage form is expr1! =expr2. That is, when the values of expr1 and expr2 are not equal, the result is 1 (true), otherwise it is 0 (false).
Recommended: "c Language Tutorial"
"!=" in c language is a relational operator. The relational operators in c language are:
Relational operators are all binary operators, and their associativity is left associative. Relational operators have lower precedence than arithmetic operators and higher than assignment operators. Among the six relational operators, , >= have the same precedence, which is higher than == and !=, and == and != have the same precedence.
For more programming related content, please pay attention to the Programming Introduction column on the php Chinese website!
The above is the detailed content of How to express not equal in C language?. For more information, please follow other related articles on the PHP Chinese website!