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
Can you call the base class method without creating an instance?
What are the limitations of inheritance?
What is virtual?
What is the super keyword?
What is the practical implementation of inner classes?
Differences between functional programming and object-oriented programming?
Describe inheritance and non-inheritance of a derived class?
How can we restrict inheritance for a class so that no class can be inherited from it?
What is the main difference between overloading and overriding?
What are inner classes and what is the practical implementation of inner classes?
Explain the usage of encapsulation?
Can you explain primordial class loader?
Explain about uml?
What is the best tool for modeling and ORM framework
What is a subclass?