C++ Operator Overloading Question:
Download Job Interview Questions and Answers PDF
Can you please explain the difference between overloaded functions and overridden functions?
Answer:
Overloading is a static or compile-time binding and Overriding is dynamic or run-time binding.
Redefining a function in a derived class is called function overriding
A derived class can override a base-class member function by supplying a new version of that function with the same signature (if the signature were different, this would be function overloading rather than function overriding).
Redefining a function in a derived class is called function overriding
A derived class can override a base-class member function by supplying a new version of that function with the same signature (if the signature were different, this would be function overloading rather than function overriding).
Download C++ Operator Overloading Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain overloading unary operator? | What is the return type of the conversion operator? a) void b) int c) float d) no return type |