1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Liono4ka [1.6K]
3 years ago
9

Explain by details function overloading in C++

Computers and Technology
1 answer:
Art [367]3 years ago
7 0

Answer:

Function overloading is the feature in C++ where two functions  can have same name but having different arguments.Function overloading is used to implement polymorphism means existing in more than one form or to be specific run time polymorphism. Do not confuse it with function overriding both are different.

For example:-

#include<iostream>

using namespace std;

int sum1(int arg)

{

    return arg+10;

}

int sum1(int arg1 ,int arg2)

{

    return arg1+arg2;

}

int main()

{

     int a=sum1(10);

int b=sum1(10,20);

cout<<a<<" "<<b;

return 0;

}

Output:-

20 30

The output is different according to the input.

You might be interested in
There are 2048bytes in4megabytes true or false​
ollegr [7]

Answer:

Explanation:

bonjour,

1 MB =  1 000 000 B (bytes)

4 MB = 4 000 000B

=> false

5 0
3 years ago
An arrangement in which local businesses team up with schools, hiring students to perform jobs that use knowledge and skills tau
Kazeer [188]

It is called a Cooperative program

A Cooperative program refers to a combination of both academic study and vocational activities in one curriculum of education. The purpose of this program is to provide the students with both knowledge in theory and practical skills that make them more prepared in the real world.


4 0
4 years ago
Read 2 more answers
(Q003) The difference between a parameter and an exogenous variable is that Group of answer choices a parameter is allowed to ch
ozzi

Answer:

a parameter is fixed over time, while an exogenous variable is allowed to change over time.

Explanation:

A parameter can be defined as a value that can be passed to a function. Thus, a parameter refers to a value that must be passed into a function, subroutine or procedure when it is called.

This value can be passed to a function either by reference or by value.

Basically, parameters can serve as a model for a function; when used as an input, such as for passing a value to a function and when used as an output, such as for retrieving a value from the same function.

A variable can be defined as a placeholder or container for holding a piece of information that can be modified or edited. Thus, a variable stores information which is passed from the location of the method call directly to the method that is called by the program.

An exogenous variable can be defined as a that's independent of other variables in a system i.e it's not affected by other variables.

This ultimately implies that, the difference between a parameter and an exogenous variable is that a parameter is fixed over time, while an exogenous variable is allowed to change over time and as such it has a relationship with other variables in a system.

3 0
3 years ago
What type of cable is used to connect a workstation serial port to a cisco router console port?
butalik [34]

a <span>Ethernet-<span>Cable is a how to put it together</span></span>

<span><span /></span>

6 0
4 years ago
You can insert pictures,such as scanned photographs, line art, and artwork, into a presentation. (points : 2) true false
Lady bird [3.3K]
True, i have done this before in my presentation slides
5 0
3 years ago
Other questions:
  • A binary search can be performed only on ____.
    6·1 answer
  • With respect to PERT and​ CPM, slack A. is a task or subproject that must be completed. B. marks the start or completion of a ta
    9·1 answer
  • Question 5 (10 points)
    12·1 answer
  • A sequence of one or more characters is called
    14·1 answer
  • A standard for compressing music into computer files that can be easily exchanged on the Internet is called a(n) ______. A. musi
    5·1 answer
  • Tor F: Deleting cell data is the same as clearing the contents of a cell.
    10·1 answer
  • Mention two strategies of collecting data​
    13·1 answer
  • Larry does not want to save his internet browsing details on his computer. What files should Larry delete to clear his informati
    13·2 answers
  • Which are resources that a programmer might use? Select all that apply.
    5·2 answers
  • Select the three concepts of capital outlay.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!