Besides operators for assigning and combining values, you also have a set of operators that are used to compare two values and yield a true or false result. Is 1 equal to 2? No (false). Is 100 divided by 1 equal to 1 multiplied by 100? Yes (true). The C programming language provides several symbols to help you test the veracity of an expression:
|= =||Is equal to?|
|>||Is greater than?|
|<||Is less than?|
|!=||Is not equal to?|
The double equals sign == is used to distinguish the expression from an assignment, because you can actually test for the veracity of an assignment within an expression. Like using pre-operators, this is not advised for code clarity but is sometimes useful.
So were you to write code such as the following inside a test condition, ...