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
Do structs support inheritance?
Explain the meaning of object in object oriented programming?
What is difference between polymorphism and normalization?
What is abstraction? How does it differ from encapsulation
What is the difference abstract class and interface?
What is the function of dynamic typing?
What are inner classes and what is the practical implementation of inner classes?
What is the use of finalize method?
Explain persistence?
Why is C not an OOP language?
Explain the purpose of composition.
Write basic concepts of oops?
What is a constructor in class?
What is hybrid inheritance?
Explain what is object oriented programming language?