Operator precedence describes the order by which operators are evaluated in a certain language. In C, they are evaluated according to the following table:

Note that operator precedence applies to type declarations as well.

Also note that the binary + and - operators are at precedence four, and the + and - at level two are the unary plus and minus.

Example

Here are some examples of operator precedence cases that can be a bit tricky, try to see if you can figure out what they mean.

if(x = y == z){
 
}
*p[i];
*p++;
x << y + z;