Reply To: operator precedence and associativity in C

Humble Devassy Chirammal Forums C-programming.. operator precedence and associativity in C Reply To: operator precedence and associativity in C

#2300
Humble
Keymaster

The order in which operators are evaluated is called operator precedence or the order of operations.

Unary operators ( ++ — + – ) order of evaluation is from right to left, so an expression like:

*p++;

would perform the ++ before the *

The comma operator (,) works almost like the semicolon ; that separates one C statement from another. The comma-separated expressions are evaluated from left to right.