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
Sam’s password is known to be formed of 3 decimal digits (0-9) in a given order. Karren and Larry are attempting to determine Sa
prohojiy [21]

Answer:

100

Explanation:

7 0
3 years ago
Read 2 more answers
In which contingency plan testing strategy do individuals participate in a role-playing exercise in which the CP team is present
vesna_86 [32]

Answer:  B. structured walk-through

4 0
3 years ago
Read 2 more answers
A __________ acts as separate network that rests outside the secure network perimeter so untrusted users can access web servers
pychu [463]
Firewall
Dont forget to thanks and give brianliest.
4 0
3 years ago
Pleaseee need help ASAP!!<br><br> Will mark BRAINLIEST!! :)
torisob [31]

Answer:

The correct option is Option B

Explanation:

We need to find examples of client-side code.

Client Side code: The part of code, that doesn't require server for performing specific task

SO, The correct option is Option B

Prompt for special characters in user name

Reason: We can use alert to generate prompt using JavaScript or through validation and it can be done on client side.

All other options, we need to hit the server to perform the task, So they are not client-side code.

6 0
3 years ago
What kind of output device would not be used to output images
saveliy_v [14]

Answer:

Speakers.

Explanation: Cause they only output sound, and are devices, further more they are not used to output images, like how could speakers output images using sound? They can't.

3 0
3 years ago
Other questions:
  • How to cite a website, like asha.org?
    6·1 answer
  • Is a book considered technology?
    8·2 answers
  • There are no breakpoints in the "Access Customer Account" subpage however there is an error. What will happen if you choose to s
    11·1 answer
  • In this challenge, write a function to add two floating point numbers. Determine the integer floor of the sum. The floor is the
    8·1 answer
  • (Help please I don't know what to choose because it's both text and email but I can only pick one. HELP!!!!!!!!!!)
    6·2 answers
  • Which device is responsible for converting the main electric supply into usable voltage levels inside a computer?
    12·2 answers
  • Why, y did brainly just do that........or did it just happen to me
    12·2 answers
  • Consider the relational schema below: Students(sid: integer, sname: string, major: string) Courses(cid: integer, cname: string,
    9·1 answer
  • The full meaning of ENIAC,ABACUS,EDVAC,EDSAC<br>and explain ​
    7·1 answer
  • A<br>A<br>printount<br>of your report or a till slip is an<br>example of what​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!