Identify the operator that gets the highest precedence while evaluating the given expression: a + b % c * d - e
Advertisements
Question
Identify the operator that gets the highest precedence while evaluating the given expression:
a + b % c * d - e
Options
+
%
-
*
MCQ
Advertisements
Solution
%
Explanation:
Modulus operator % has the highest precedence among the listed operators. This means the operation b%c will be evaluated first before any multiplication, addition, or subtraction.
shaalaa.com
Tokens
Is there an error in this question or solution?
