Overview of the C Operators 6.2 Overview of the C Operators Variables and constants can be used in conjunction with C operators to create more complex expressions. Table 6-1 presents the set of C operators. Unary prefix operators, which precede a single operand. Binary operators, which take two operands and perform a variety of arithmetic and logical operations. Assignment operators, which assign a value to a variable.
Operator precedence determines the grouping of terms in an expression.
This affects how an expression is evaluated. In an unparenthesized expression, operators of higher precedence are evaluated before those of lower precedence. Table 6-2 shows the precedence the compiler uses to evaluate the C operators. Operators of equal precedence appear in the same row. Associativity relates to precedence, and resolves any ambiguity over the grouping of operators with the same precedence.