Advertisement

Operator Precedence, Associativity, Implicit Type Caste, Explicit Type Caste, Examples

Operator Precedence, Associativity, Implicit Type Caste, Explicit Type Caste, Examples If using more then one operator in an expression, then it is necessary to know the precedence and associative of the operator. The operator precedence defines the priority of the operators that means precedence indicates which operator applied first on the given expression. The higher precedence operator is evaluated before the low precedence operator.
But the problem occurs when an expression has two or more than two operators with the same precedence, so to resolve this problem a new term is introduced by the C standard, it is called associativity.
The associativity defines the order in which operators of the same precedence are evaluated, that means evaluated from right to left or left to right.

Operator Precedence,Associativity,Implicit Type Caste,Explicit Type Caste,Examples,

Post a Comment

0 Comments