PRECEDENCE OF C OPERATORS, HIGH TO LOW Given an unparenthesized expression of the form X op1 Y op2 Z where op1, op2 are operators, the ambiguity is resolved by grouping Y with the operand opposite the higher-precedence operator of the two in case of unequal precedence. If op1, op2 have the same precedence (by being in the same numbered level in the table below), then it is evaluated as (X op1 Y) op2 Z ("left-associative" operators) in all cases except the conditional and assignment operators---levels 3 and 2 below---which are right-associative. [From Harbison and Steele, C: A REFERENCE MANUAL] 16: a[k] (subscripting) f(...) (function calls) . (direct component selection) -> (indirect component selection) ---------------------------------------------------------------- 15: ++ -- (POSTFIX increment/decrement) ---------------------------------------------------------------- 14: ++ -- (PREFIX increment/decrement) sizeof (size) (type name) (casts) ~ (bitwise NOT) ! (logical NOT) - (arithmetic unary negation) & (address of) * (indirection) ---------------------------------------------------------------- 13: * / % (times, divide, remainder) ---------------------------------------------------------------- 12: + - (plus, minus [not unary negation]) ---------------------------------------------------------------- 11: << >> (left and right shifts) ---------------------------------------------------------------- 10: < > <= >= (relational) ---------------------------------------------------------------- 9: == != (equality, inequality) ---------------------------------------------------------------- 8: & (bitwise AND) ---------------------------------------------------------------- 7: ^ (bitwise XOR) ---------------------------------------------------------------- 6: | (bitwise OR) ---------------------------------------------------------------- 5: && (logical AND) ---------------------------------------------------------------- 4: || (logical OR) ---------------------------------------------------------------- 3: ? : (conditional [right-associative]) ---------------------------------------------------------------- 2: = += -= (assignment [right-associative]) *= /= %= <<= >>= &= ^= |= ---------------------------------------------------------------- 1: , (comma: sequential evaluation)