Difficulty: Easy
Correct Answer: 7 20.8
Explanation:
Introduction / Context:
The function evaluates a cubic-like expression using Horner-style nesting. Default arguments make most coefficients zero unless explicitly provided. You must track which parameters receive values and which default to zero.
Given Data / Assumptions:
Concept / Approach:
For the first call, every nested term beyond p cancels to zero, leaving p. For the second call, only q contributes beyond p, scaled by x once. Evaluating carefully yields numeric results.
Step-by-Step Solution:
Verification / Alternative check:
Writing the general form as p + qx + rx^2 + sx^3 confirms that only qx contributes in the second call.
Why Other Options Are Wrong:
Common Pitfalls:
Misplacing parentheses in nested expressions, or forgetting that only q survives when r and s are zero.
Final Answer:
7 20.8
Discussion & Comments