EE109 – Spring 2023 Introduction to Embedded Systems

EE109 – Spring 2023: Introduction to Embedded Systems

Operator Precedence

The table below lists the order in which operators are evaluated in C. Operators on the upper lines are evaluated before ones below. Operators on the same line are evaluated using the associativity direction listed for that line. For example

    x = a + b - c + d;

is evaluated as

    x = ((a + b) - c) + d;

since the + and − operators on line 4 of the table have left-to-right associativity.

 

The above table is copied from The C Programming Language, 2nd Edition by Kernighan and Ritchie, page 53.