Hierarchy operation
if we use two or more operator in arithmetic instruction than we use hierarchy operator problem . the priority or precedence in which the arithmetic operator are perform called hierarchy operations.
example:- 2*x-3*y , a/(b*c).
Associativity operators: -
when an expression take two or more operator of same priority. Than the tie between them and we use associativity of the operator.
associativity are to type:-
1. left to right :- it means that the left operand must be unambiguous (non- confusing) .
2. right to left :- it mean the right operand must be unambiguous (non- confusing).
example:- a=3/2*5;
Comments
Post a Comment