Answer Posted / pankaj kumar sharma
Function overloading takes place when a function is
overloaded with two or more tasks ie. same function is
having different behaviour.
It takes place when two functions have same name but
differs in argument list ie. may be the no of arg in both
fun are different or type of the arguments in argument list
are diff.
As return type of a func. does not take part in name
mangling so return type for overloaded functions may differ
or not.
eg: int fun(int arg1, int arg2)
char* fun(char* ptr1)
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What is encapsulation example?
What are the advantages of polymorphism?
Why is abstraction used?
Is oop better than procedural?
Why do we use class in oops?
What are the benefits of oop?
How do you use inheritance in unity?
Why is static class not inherited?
What is the diamond problem in inheritance?
What are the benefits of polymorphism?
What is inheritance write a program to show use of inheritance?
What is a function in oop?
Why do we use encapsulation in oops?
What is polymorphism and why is it important?
What is the difference between static polymorphism and dynamic polymorphism?