Rules of Using Increment and Decrement in Long Expression
Rules of Using Increment and Decrement in Long Expression
1. Same precedence
a. Postfix and prefix.
b. Multiply and divide.
c. Addition and subtraction.
2. highest priority level:
a. Prefix increment decrement and postfix increment decrement.
i. In longest expression first, we apply increment and decrement there is same
precedence of both so we move from left to right.
b. Multiply and divide.
i. Second, we have to check either multiplication or division operator is used in
expression or not, if there is so after applying increment and decrement from
left to right we
c. Addition and subtraction.