Hi Guys !
Write the rule of Operator Associavity and Preeddence ?
(60 words + example )
Answers
Answered by
4
Interesting facts about Operator Precedence and Associativity in C
Operator precedence determines which operator is performed first in an expression with more than one operators with different precedence. For example 10 + 20 * 30 is calculated as 10 + (20 * 30) and not as (10 + 20) * 30.
Associativity is used when two operators of same precedence appear in an expression. Associativity can be either Left to Right or Right to Left. For example ‘*’ and ‘/’ have same precedence and their associativity is Left to Right, so the expression “100 / 10 * 10” is treated as “(100 / 10) * 10”.
Precedence and Associativity are two characteristics of operators that determine the evaluation order of subexpressions in absence of brackets.
Operator precedence determines which operator is performed first in an expression with more than one operators with different precedence. For example 10 + 20 * 30 is calculated as 10 + (20 * 30) and not as (10 + 20) * 30.
Associativity is used when two operators of same precedence appear in an expression. Associativity can be either Left to Right or Right to Left. For example ‘*’ and ‘/’ have same precedence and their associativity is Left to Right, so the expression “100 / 10 * 10” is treated as “(100 / 10) * 10”.
Precedence and Associativity are two characteristics of operators that determine the evaluation order of subexpressions in absence of brackets.
Answered by
1
this is 100 would... thank you
Similar questions