Next: Control Statements
Up: Expressions and Operators
Previous: Logical Connectors
Three types of expression have been introduced here;
- Arithmetic expressions are simple, but watch out for subtle type conversions.
The shorthand notations may save you a lot of typing.
- Comparison takes two numbers and produces a logical result.
Comparisons are usually found controlling if statements or loops.
- Logical connectors allow several comparisons to be combined into a single test.
Lazy evaluation can improve the efficiency of the program by reducing the amount of calculation required.
C also provides bit manipulation operators.
These are too specialised for the scope of this course.