Arithmetic operators are the symbols that represent arithmetic math operations. Examples include + (addition operator), – (subtraction operator), * (multiplication operator), and / (division operator).
there are five arithmetic operators in C language.
- divide (/) .
*,% and / are having same priority but higher than – and +.
+ and – having some priority.
for example have following expression.
first we solve astrick because it has higher priority than (+) and (_).
whenever two or more arithmetic operators of the same priority comes in the expression.
whenever two or more arithmetic operators of the same priority comes in the expression then we have to resolve them in left to right manner.
like above example astrick comes in the left in comparision to (/) operators it will be solve first.
note:–associative rule is left to right for arithmetic operator.which means equal priority
will be resolved in left to right manner.