answersLogoWhite

0


Best Answer

Their parameter-lists and returns values.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When a function is overloaded there are multiple definitions of the functions What makes the various definitions of the function different from each other?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Differentitate between overload function and function template?

An overloaded function is a function that has two or more implementations that each operate upon a different type. Function templates allow the compiler to generate overloaded functions on an as required basis for any function where the implementations only differ by type.


Can static member function be overloaded?

Yes. Any function can be overloaded. However you cannot override a static member function. Only instance members can be overridden.


When to create a template function?

A template function is used when you want to write some kind of function that can be applied to different data types. It is a form of overloading, but you don't have to actually write all of the overloaded variants.


Why ternary operator is not overloaded?

The ternary operator (known as the conditional operator in C++) cannot be overloaded because it is impossible to pass a test operand and two expression operands (either or both of which may be comma-separated) to a function. You can only pass values or references as arguments to a function. Even if it were possible, built-in functions and operators that rely on the conditional operator would likely break. Like all the other operators that cannot be overloaded (sizeof, typeid, ::, . and .*) the results must always be predictable because built-in operators and functions rely on them so heavily.


CAN Overloaded functions can return default values?

I'm not sure I understand you as it wouldn't make sense for a function to return a default value. Do you actually mean can a function return an argument that has a default value? If so, then yes. Any argument passed to a function, whether defaulted or not, can be returned by the same function. If the argument is passed by value then you must return it by value. If passed by reference (which cannot be defaulted) then you can either return by reference or by value. However, if you pass by non-constant reference then you can just use the reference as an output argument, and use the actual return value for some other purpose, such as reporting any error condition(s) created by the function. Overloaded functions are no different to ordinary functions, the only criteria is that each overload has an unique signature. The return value does not form any part of the signature, thus signatures cannot differ by return type alone.

Related questions

Differentitate between overload function and function template?

An overloaded function is a function that has two or more implementations that each operate upon a different type. Function templates allow the compiler to generate overloaded functions on an as required basis for any function where the implementations only differ by type.


What are the function of header files?

They declare library functions They contain macro definitions They contain type definitions


How the compiler compiles overloaded method?

method overloading occurs when we use two functions or more with the same name.In function overloading compiler detect which method is call actually throw the parameters passed to the methods.In function overloading parameters of functions are different.


What are the different function of life?

what are the different functions of life?


Can static member function be overloaded?

Yes. Any function can be overloaded. However you cannot override a static member function. Only instance members can be overridden.


What Excel function offers the possibility to view different results depending on the entered condition?

The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.The IF Function will do that, but other functions, like the VLOOKUP, can also return different results depending on the conditions.


How does the exponential function differ from other functions?

Every function differs from every other function. Otherwise they would not be different functions!


How are piece-wise functions different from other functions?

That means that the functions is made up of different functions - for example, one function for one interval, and another function for a different interval. Such a function is still a legal function - it meets all the requirements of the definition of a "function". However, in the general case, you can't write it as "y = (some expression)", using a single expression at the right.


Why ternary operator is not overloaded?

The ternary operator (known as the conditional operator in C++) cannot be overloaded because it is impossible to pass a test operand and two expression operands (either or both of which may be comma-separated) to a function. You can only pass values or references as arguments to a function. Even if it were possible, built-in functions and operators that rely on the conditional operator would likely break. Like all the other operators that cannot be overloaded (sizeof, typeid, ::, . and .*) the results must always be predictable because built-in operators and functions rely on them so heavily.


When to create a template function?

A template function is used when you want to write some kind of function that can be applied to different data types. It is a form of overloading, but you don't have to actually write all of the overloaded variants.


What function in Excel deals with true or false?

The different functions from the Logical functions category deal with true and false. The main one of them is the IF function.


What cells perform different functions?

Different cells are different in structure because of their different functions (e.g. plant cells have cell walls because they don't have bones). Also, cells have different functions because they work together with other cells to create a working system (e.g. the human body)