Difficulty: Easy
Correct Answer: / * + -
Explanation:
Introduction / Context:
Arithmetic operator precedence governs how C parses expressions without explicit parentheses. While * and / share the same precedence level (with % as well), they together outrank + and -. This question checks that you can order these groups correctly.
Given Data / Assumptions:
Concept / Approach:
The multiplicative operators (, /, %) have higher precedence than the additive operators (+, -). Within each group the left-to-right associativity applies, but the exact sequence between * and / is not a precedence distinction—they are coequal. Any listing that shows the multiplicative group before the additive group reflects the correct hierarchy.
Step-by-Step Solution:
Group 1 (higher): * and / (and %).Group 2 (lower): + and -.Choose the option that places the multiplicative group before the additive group.Option “/ * + -” satisfies this requirement.
Verification / Alternative check:
Parenthesize a sample: 3 + 4 * 5 is parsed as 3 + (4 * 5), confirming multiplicative precedence over additive.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming addition happens before multiplication, a common arithmetic misconception.
Final Answer:
/ * + -.
Discussion & Comments