What is the result of the expression 10 - 5 * 2 in C?
A. 20
B. 10
C. 0
D. -5
Answer: Option C
Solution(By Examveda Team)
In C, arithmetic expressions follow the order of precedence, where multiplication and division have higher precedence than addition and subtraction. Therefore, in the expression 10 - 5 * 2, the multiplication (5 * 2) is performed first, resulting in 10 - 10, which indeed equals 0.Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged
Join The Discussion