answersLogoWhite

0

It's a way by which you use define the same function for different input types. For example, think about the the operator "+" which in java works for adding integers, floating point numbers and even string concatenation. The way such functionality is achieved is by overloading.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is function overloading in c language of computer?

There is no such thing as function overloading in C; that is a feature of C++. Function overloading allows us to provide two or more implementations of the same function. Typically, we use function overloading so that the same function can cater for different types. For instance, we might provide one implementation that is optimised to handle an integer argument while another is optimised to handle a real argument. We can also use function overloading to provide a common implementation of a function which can then be invoked by overloads that handle the low-level type conversions.


How operator overloading differ from function overloading?

Function overloading is multiple definition with different signatures(the parameters should be different) for the same function. The parameter list have to be different in each definition. The compiler will not accept if the return type alone is changed. Operator overloading is defining a function for a particular operator. The operator loading function can not be overloaded through function overloading.


What are the similarities between constructor overloading and function overloading?

The only similarity is that both constructor and function overloads are distinguished by their signature -- the number and type of their arguments. Functions differ in that they also have a return type, which is also part of the signature, whereas constructors have no return type, not even void.


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 do you use of operator overloading in c?

Overloading, Overriding, Polymorphism, Information Hiding, Inheritance all these are CONCEPTS of C++ and Java. An Object Oriented Language and not of C language. Thats why Bjarne Stroustrup came up with C++ ...

Related Questions

define function overloading?

Defining several functions with the same name with unique list of parameters is called as function overloading.


Is it possible to do operator overloading in c?

No. Operator and/or function overloading is only a C++ thing.


What is function overloading in c language of computer?

There is no such thing as function overloading in C; that is a feature of C++. Function overloading allows us to provide two or more implementations of the same function. Typically, we use function overloading so that the same function can cater for different types. For instance, we might provide one implementation that is optimised to handle an integer argument while another is optimised to handle a real argument. We can also use function overloading to provide a common implementation of a function which can then be invoked by overloads that handle the low-level type conversions.


How operator overloading differ from function overloading?

Function overloading is multiple definition with different signatures(the parameters should be different) for the same function. The parameter list have to be different in each definition. The compiler will not accept if the return type alone is changed. Operator overloading is defining a function for a particular operator. The operator loading function can not be overloaded through function overloading.


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 is an operator overloading in C?

one function but multiple behaviours depending on the parameters


The rules for constructing a function can be referred to as the function's?

Syntax refers to the rules for constructing a function.


What is the c plus plus program to calculate the area of a circle using function overloading?

Function overloading is used when you want to re-use the same function name with different argument types or a different number of arguments. Calculating the area of a circle isn't the sort of function that requires overloading since the only argument you need is the radius. double area_of_circle (const double radius) { const double pi=4*atan(1); return pi*radius*radius; }


What are the similarities between constructor overloading and function overloading?

The only similarity is that both constructor and function overloads are distinguished by their signature -- the number and type of their arguments. Functions differ in that they also have a return type, which is also part of the signature, whereas constructors have no return type, not even void.


What is the function of the breaker for an electric range?

The function of the breaker for an electric range is to protect the appliance and the electrical circuit from overloading or short circuits by interrupting the flow of electricity when there is a problem.


Would you be able to function in society without rules?

would we be able to function in society without rules


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.

Trending Questions
How do you design reinforced concrete piles? Do you change the high leg if your three phase motor is running in reverse? What is the force that lifts up and moves maglev trains? Can mining companies make or cannot make repairs to land after the mine is used? Which one of the following lists represents three common review types associated with an SQA project? Is true of the flow of electricity through a DC circuit? What are My career aspirations as an engineer? How does cement make concrete building? What is the proper way to store a torque wrench? How many 125 watt bulbs can be used on a 15amp circuit? Write a java application that generates two random numbers using built in method math random ranging 5 to 8 the program should use another built in method to calculate the power of xy the x value is t? What is the purpose of the thrust wear down or low thrust oil pressure trip? Are genes arranged in coiled strands called centromeres? You are trying to find a valve currently attached to your washing machine drain line at the drain. It is plastic and has a BB in a vent hole that blocks overflow of water. Genesis valve? Abstract class can be private? With a pulley system a force of only 50 lb can lift a 500-lb weight What is the mechanical advantage if this system is 100 percent efficient? Can 110volt fan motor be used in a 220 volt electric furnace? What is the difference between electronic support measuerment and ELINT? What are five safety precautions to use when stacking materials? How much school you need to be video game programmer?