Why does the function arguments are called as "signatures"?
Answer Posted / arul
The arguments distinguish functions with the same name
(functional polymorphism). The name alone does not
necessarily identify a unique function. However, the name
and its arguments (signatures) will uniquely identify a
function.
In real life we see suppose, in class there are two guys
with same name, but they can be easily identified by
their signatures. The same concept is applied here.
ex:
class person
{
public:
char getsex();
void setsex(char);
void setsex(int);
};
In the above example we see that there is a function setsex
() with same name but with different signature.
Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What is single and multiple inheritance?
Do we require a parameter for constructors?
What is difference between static and non-static fields of a class?
What is the difference between a class and an object?
Can we access interface static method using interface references?
What is early and late Binding?
What is the main difference between overloading and overriding?
Explain about encapsulation?
Difference between composition and inheritance ?
What are the access modifiers?
Explain serialization and overriding?
What is a friend function?
What is the super keyword?
What is the purpose of late binding in object-oriented programming?
Explain the use of Vtable and what are the various problems to override the functions?