Operator hierarchy or precedence is a set of rules that determines the order in which operators are evaluated in a programming language. In most programming languages, including C, operators have different levels of precedence. When multiple operators are used in an expression, the operator with the highest precedence is evaluated first, followed by operators with lower precedence.
The following is the operator hierarchy or precedence in C, in descending order of precedence:
Note that parentheses can be used to change the order of evaluation in an expression. For example, if you want to evaluate the addition before the multiplication in the expression a * b + c * d, you can use parentheses as follows: (a * b) + (c * d).
In conclusion, understanding operator hierarchy or precedence is essential in writing complex expressions in programming languages like C. It helps the programmer to write correct and efficient code.