Answer Posted / sujith
The above answer is well explained. In technical terms it
can be explained as same function name with different
signature. Signature means only interms of arguments, and
not for return types. The idea is very simple and is a
feature which make the end user comfortable, and as Swetcha
said, it is finally the compiler will decide, which function
to call when, according to the type of data passed to the
function.
eg. int add(int, int)
double add(double, double)
char add(char, char)
but the following is not possible
int add(int, int)
char add(int, int)
| Is This Answer Correct ? | 0 Yes | 7 No |
Post New Answer View All Answers
What is methods in oop?
What are the types of abstraction?
Write a program to reverse a string using recursive function?
How Do you Code Composition and Aggregation in C++ ?
What is purpose of inheritance?
What is the use of oops?
Is data hiding and abstraction same?
What is an advantage of polymorphism?
Which language is not a true object oriented programming language?
What is and I oop mean?
What is the advantage of oop over procedural language?
What is this pointer in oop?
What is the important feature of inheritance?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is encapsulation in oops?