Difficulty: Easy
Correct Answer: None of the above
Explanation:
Introduction / Context:Function overloading lets multiple functions share the same name while differing in parameter types or counts. Many myths surround what must match among overloads. This question targets those misconceptions by asking what overloaded functions are actually required to have in common.
Given Data / Assumptions:
Concept / Approach:
Step-by-Step Solution:
Evaluate options: same return type? not required.Same number of parameters? not required; both arity and types may vary.Perform same function? not enforced by the compiler; only name/parameters matter.Therefore, the correct choice is ”None of the above”.Verification / Alternative check:
Examples from the standard library: std::abs has many overloads for int, long, long long, float, double, etc., with different parameter types and same name; semantics are similar by convention, not by rule.Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
None of the above
Discussion & Comments