What is the result of the expression 3 * (4 + 2) in C?
A. 18
B. 24
C. 9
D. 14
Answer: Option A
Solution(By Examveda Team)
> In C, arithmetic expressions follow the order of operations (PEMDAS/BODMAS), where parentheses have the highest precedence. Therefore, the expression 3 * (4 + 2) is evaluated as follows: First, the expression inside the parentheses is calculated (4 + 2), which results in 6. Then, the multiplication is performed: 3 * 6, which indeed equals 18.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