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
iogann1982 [59]
3 years ago
15

The value of a default argument must be a(n) _________.

Computers and Technology
1 answer:
kvv77 [185]3 years ago
3 0

Answer:

Constant

Explanation:

A default argument is a value provided in a function declaration that the compiler automatically assigns if the function caller does not provide a default value for the argument.

The value of a default argument must be constant.

The default value parameter must be a  constant for compiling. Compiler does not accept dynamically calculated value against optional parameter. The reason behind this it is not certain that the dynamic value you provide would offer some valid value.

<u>Example:</u>

#include<iostream>  

using namespace std;  

/*A function with default arguments, it can be called upto 4 arguments*/

int sumnum(int x, int y, int z=0, int w=0)  

{  

return (x + y + z + w);  

}  

int main()  //driver function

{  

cout << sumnum(10, 15) << endl;  

cout << sumnum(10, 15, 25) << endl;  

cout << sumnum(10, 15, 25, 30) << endl;  

return 0;  

}

<u>Output</u>

<u>25 </u>

<u>50 </u>

<u>80</u>

You might be interested in
What does the following expression evaluate to?: "2 + 8"
lozanna [386]
10 tell me if I’m wrong
7 0
3 years ago
2 - identifiez fill in the blanks activity 2 attempts left late due november 8th 11:59 pm instructions you will hear a series of
malfutka [58]

Economic sanctions programs are generally administered and enforced by the Office of Foreign Assets Control against nations and specialized categories of people, such as terrorists and drug traffickers.

To achieve aims in foreign policy and national security, sanctions can be either sweeping or selective, using the asset freezing and trade restrictions. Sanctions management has a long history at the Treasury Department. Gallatin, Secretary of the Treasury, oversaw the sanctions against Great Britain for harassing American seamen beginning before the War of 1812. Congress passed a statute during the Civil War that forbade trade with the Confederacy, demanded the loss of products used in such trade, and established a licensing system governed by Treasury-managed rules and regulations.

Learn more about program here-

brainly.com/question/14618533

#SPJ4

5 0
1 year ago
All of the information on the Internet has been verified and is factual. <br> a. True<br> b. False
Hitman42 [59]
False because someone could lie on the internet to imoress someone
5 0
4 years ago
Read 2 more answers
Pls help me this quation give me the answer Do you think that dealing with big data demands high ethical regulations, accountabi
jarptica [38.1K]

Answer:

yes, in case of big data demand it's duty of person as well as company to follow ethical principal and adhere the moral standard for keeping the information of the big data company confidential.

Explanation:

may it's help you

6 0
3 years ago
QUESTION 9 of 10: Bob charged $200 for a plane ticket last month. When he received his statement, he saw that he could pay the m
IgorLugansk [536]

Answer:

yes cuz 25x8=200

Explanation:

3 0
4 years ago
Read 2 more answers
Other questions:
  • A technician wants to create a new partition on a new additional hard drive. what tool should be used?
    15·1 answer
  • What does the group feature allow you to do?
    5·1 answer
  • What is Application Software ??
    12·2 answers
  • Which alignment aligns text to the left and right side margins?
    15·1 answer
  • How to bold words in microsoft word
    10·1 answer
  • The following program is run. Then the user clicks the "bottomButton" TWO TIMES. What will be displayed in the console?
    6·2 answers
  • In MLA formatting, which of the<br> following is correct?
    6·1 answer
  • What is Digital Etiquette? Explain in your own words
    13·1 answer
  • An employee was watching Jessica, an IT employee, typing in many different confusing terms. Jessica explained that she needed to
    7·2 answers
  • What is string literal in Java?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!