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
You have a friend that says she is interested in going into web development. She is very knowledgeable in terms of technology an
Schach [20]

Answer:

She should be aware several social media spectators are going to watch her content. She will get exposed on the Internet.

Explanation:

She should be aware several social media spectators are going to watch her content. She will get exposed on the Internet.

She should think before saying anything as one of his fans may complaint about her content to the police if she makes a joke about shooting up a place.

She has to be careful with his words as this may lead to termination from the job.

4 0
3 years ago
Write a note on secondary storage​
12345 [234]
Secondary storage refers to storage devices and media that are not constantly accessible by a computer system. Examples include external hard drives, portable flash drives, CDs, and DVDs.
good luck
4 0
4 years ago
. How are returnspredicted in modern microprocessors?
gayaneshka [121]

Answer:

Return are predicted in the modern microprocessor as, branch predictor is the modern method for the processor for the prediction. The basic function of the branch predictor is improving in the pipeline instruction. It is basically the important part for implement the execution and the pipe lining. And the return predicted uses the call by reference technique for the data in instruction.

5 0
3 years ago
Which Internet security risk is associated with dumpster diving?
lora16 [44]

Which Internet security risk is associated with dumpster diving? Identity theft. Identity theft is associated with dumpster diving because it involves taking something from someone else. In this case, instead of looking through a dumpster to get items that were someone elses, they are taking their identity and using it for their own purposes. So identity theft and dumpster diving relate when used in this context.

3 0
4 years ago
Read 2 more answers
How to make stuff bigger and smaller in photoshop?
Oksana_A [137]
It depends on what software or application you are using.
7 0
4 years ago
Other questions:
  • In which area of engineering does material selection play a vital role a design optimization b forensic engineering c mechanical
    6·1 answer
  • All phones must have a way of making and then terminating a connection to the phone network; however the exact procedure for doi
    12·1 answer
  • The Mail Merge option is located in which tab? a;home b;insert c;refernces d;mailings
    11·2 answers
  • The emergence of MP3 (iPod) technology is an example of creative destruction because a. It is less expensive than compact discs
    14·1 answer
  • Is it possible to have a deadlock involving only oneprocess? Explain your answer.
    11·1 answer
  • The length of the hypotenuse of a right-angled triangle is the square root of the sum of the squares of the other two sides. Wri
    7·1 answer
  • When defining a variable to be used to hold textual information containing multiple characters (letters, numbers, and/or symbols
    5·1 answer
  • If anyone wants to ft heres the link
    6·1 answer
  • Images that are made up of pixels and cannot be resized without losing quality?
    11·1 answer
  • What is a list of things we use programming for??? longest gets brainly
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!