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


Please Help Members By Posting Answers For Below Questions

Can you call the base class method without creating an instance?

668


What are the limitations of inheritance?

536


What is virtual?

738


What is the super keyword?

611


What is the practical implementation of inner classes?

525






Differences between functional programming and object-oriented programming?

539


Describe inheritance and non-inheritance of a derived class?

485


How can we restrict inheritance for a class so that no class can be inherited from it?

664


What is the main difference between overloading and overriding?

578


What are inner classes and what is the practical implementation of inner classes?

474


Explain the usage of encapsulation?

602


Can you explain primordial class loader?

497


Explain about uml?

534


What is the best tool for modeling and ORM framework

559


What is a subclass?

558