Operator hierarchy or precedence

Operator hierarchy or precedence are used to decide which operation is performed first in and instruction. It’s like BODMAS rule of mathematics.

In C programming language every operator has its own priority. All operators perform operation according to their precedence.

First priority is given to logical not, than in the second level there is a residence of multiplication, division and modulus after that addition and subtraction comes.

Operator hierarchy or precedence table:-

We can understand the priority according to the below table. The higher the position of an operator is in the table, higher is its priority.

Operator hierarchy or precedence

Recommended Post: