Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Why does the function arguments are called as "signatures"?

Answers were Sorted based on User's Feedback



Why does the function arguments are called as "signatures"?..

Answer / 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

Why does the function arguments are called as "signatures"?..

Answer / padma

In the dynamic polymorphism the control has to distinguish
each function from other functions which has the same
function name.With the help of each method or function
arguments the control executes the function call,whenever it
is made.Each function call will be executed based on the
arguments passed.This is the reason, each function name
including the parameters or arguments has it own identity,
and this identification for the function is called
signature.Based on the signature, the control jumps from one
function to another in run time of the program.

Is This Answer Correct ?    1 Yes 0 No

Why does the function arguments are called as "signatures"?..

Answer / some guy

Actually, the answer is not complete, so as question is
not, let's say, "perfect". "signature" is not arguments
only, but plus "const"ness. For example in example above,
in class person there could be absolutely legal to have two
functions:
char getsex();
char getsex() const;

Though the answer would be ABSOLUTELY correct, so as the
question, in case we're talking about "functions" and NOT
about "member functions"

Is This Answer Correct ?    1 Yes 1 No

Why does the function arguments are called as "signatures"?..

Answer / ash

As function name, return type and arguments helps to
identify the function which needs to be invoked hence the
name signatures. In polymorphism there can be function
overload hence args and ret type along with name are required.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

If a method definition has been specified in class , its base class , and the interface which the class is implementing, which definition will be picked if we try to access it using interface reference and class object?

0 Answers  


How many methods are there in the externalizable interface?

0 Answers  


Do we require a parameter for constructors?

0 Answers  


What are extrinsic and intrinsic connections in object-oriented programming?

0 Answers  


Explain basic concepts of OOPS?

0 Answers  


Which keyword can be used for overloading?

0 Answers  


What are the main features of oops?

0 Answers  


What is the syntax of object oriented method call?

0 Answers  


Can encapsulation be called as a security device?

0 Answers  


What are abstract methods?

0 Answers  


What is Object Constraint Language (OCL)?

1 Answers   Protech,


What are the features of encapsulation ?

0 Answers  


Categories