The following table lists all operators from highest precedence to lowest order.
Let us see how the operator precedence will affects an expression.
Let x = 7 + 3 * 2 . Here x value is 13 but not 20, because operator * has higher precedence than +. Hence, it first multiplies 3*2 and then adds to 7.
Here, operators with the highest precedence appear at the top of the table, those with the lowest appear at the bottom.
Identity Operators<<<Back Home Next>>>Decision Making
Let us see how the operator precedence will affects an expression.
Let x = 7 + 3 * 2 . Here x value is 13 but not 20, because operator * has higher precedence than +. Hence, it first multiplies 3*2 and then adds to 7.
Here, operators with the highest precedence appear at the top of the table, those with the lowest appear at the bottom.
Identity Operators<<<Back Home Next>>>Decision Making



No comments:
Post a Comment