Function overloading in C++ means:
-
A
a function that calls itself repeatedly at run time
-
B
the same function declared inside two classes
-
C
replacing a base-class function entirely
-
D
functions with the same name but different parameter lists
Correct answer
Correct answer
D. functions with the same name but different parameter lists
14 views
Explanation
Overloads share a name but differ in the number or types of parameters; the compiler selects the right one.
Reference
Asked in: NTS, PPSC IT, Campus Interviews
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ