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]
2 years ago
15

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

Computers and Technology
1 answer:
kvv77 [185]2 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
refers to a problem-solving approach that requires defining the scope of a system, dividing it into its components, and then ide
lilavasa [31]

Answer:

D. System Analysis

Explanation:

System analysis can be defined as the process of analysing a problem in order to the know the cause thereby finding a way to resolve it or finding a solution to it.

System analysis enables us to easily study procedure or process thereby identifying what the objective of the procedures is which will in turn help to achieve what we needed to achieve.

System analysis is important because it enables easier identification of a problem which make us to find the best way to solve the problem since it is a problem solving technique which ensures that all problem are been resolved accurately and efficiently

6 0
3 years ago
What function would you use to calculate the total interest paid for the first year of a mortgage?.
WITCHER [35]

Answer:

To calculate the total interest paid for the first year of a mortgage, the formula M = [P.r (1+r)n] / [(1+r)n-1] × 12 can be used.

Explanation:

3 0
2 years ago
What is a statement that adds 1 to the int j when the int counter has a value less than the int n?
Nikitich [7]
I think the answer is n combination r or n permutation r.
Please mark me as brainliest.
5 0
3 years ago
In the design phase of the systems development life cycle (SDLC), the _____ indicates hardware and software, such as specifying
Genrish500 [490]

Answer:

Option A

Explanation:

6 0
3 years ago
The requirement, "The system shall receive information quickly," is an example of a functional requirement.
olga55 [171]

Answer: False

Explanation: Functional requirement is the requirement in the operating system that gives the description of the functioning and specific action that is done by system.

Thus, receiving the data rapidly is not the form of functional requirement as it does not specifies any function that is to be done and receiving of data is already being done and at faster rate in future.

Performance requirement is the factor that is required for defining that how well a system should perform the function.So, reviving data at rapid rate is performance requirement.So, the statement given is false.

6 0
3 years ago
Other questions:
  • To clean dirt and spilled electrolyte from a battery, use a dilute solution of either water and baking soda or water and A. sulf
    13·1 answer
  • katherine has work experience of seven years as a graphic designer and photographer. she wants to now redirect her career to web
    5·2 answers
  • _____________ is the characteristic of a resource that ensures that access is restricted to only permitted users, applications,
    14·1 answer
  • In the Unified Process (UP), related activities are grouped into UP ____. a. Services b. Disciplines c. Cycles d. Practices
    11·1 answer
  • Jack is an accountant. He can't access the spreadsheet software, which is installed on the server. What should Jack do?
    5·2 answers
  • Listening to music on giggl, join!<br><br> link will be in comments, copy and paste
    9·2 answers
  • Analyze the code and identity the value of variable a,b and c after the code execution. int a=40, b=50, c=60; if(! (a&gt;=40)) b
    15·1 answer
  • Write the definition of the function inputArray that prompts the user to input 20 numbers and stores the numbers into alpha. Wri
    6·1 answer
  • Please answer this question​
    8·1 answer
  • How do you enlarge an image to see more detail on it? (1 point)
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!