Multiple choice

What is the difference between function overloading and function overriding? a) In overloading multiple functions are available with same name, while in overriding single function is rewritten. b) Function overloading is possible in any program while function overriding is possible in inheritance. c) In overriding both functions must have same signature. In overloading multiple functions have same name but different arguments.

  1. Only a

  2. Both a and b

  3. All a, b and c

  4. Both are same

  5. Both b and c

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In overriding both functions must have same signature or prototype. In overloading multiple functions have same name but different arguments like different number of arguments and different type of arguments.