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
If you need to add more data between column A and column B, you should _____. click in column A and paste a column click anywher
Luda [366]

Answer:

Use the insert column command by placing your cursor between A and B. Then insert your data

Explanation:

3 0
4 years ago
When was the first computer invented?
sweet [91]
The EINAC at the university of pennsylvania, completed in 1946. It weighed more than 50 tons.
4 0
3 years ago
Read 2 more answers
How has the growth of industries that use computer technology changed employment?
KIM [24]
Well Member The Industrial Revolution? Well If You Forgot It Was Like Making Goods Like With Your Hands But Every Since The Factories Came Works Been Kind Of Hard To Find And Such , So If The Growth Of Industries That Use Technology Changes Employment Than We Wouldn't Have Work It Would Have Been The Industrial Revolution All Over Again
8 0
3 years ago
Which type of classroom enables students to attend lectures without being physically present with the teacher?
Kisachek [45]
An online class? I think lol
5 0
3 years ago
In a CSS document, within what must you enclose properties and values when you define a rule for a specified selector?
natulia [17]

Answer:

Curly Braces {}.

Explanation:

The syntax for writing a CSS is as following:-

selector {

property : value;

}

CSS is used for providing the style to the HTML page.Such as fonts,background,height,width etc.

For example:

h1{

font:20px;

background:red;

}

The above written CSS is for the h1 tag in HTML.The font size will be 20 pixels and background color will be red.

So we can say that we need to enclose properties and values in curly braces.

4 0
3 years ago
Other questions:
  • If you quote an author from a website in a paper, it will be important to create a _____ in your writing to give them credit for
    7·2 answers
  • I am confused about joins in sql.
    8·2 answers
  • Which is the correct process for attaching a file?
    12·1 answer
  • Can anyone please help with this programming code in python num= 7 if num &gt; 3: print(“3”) if num &lt; 5: print(“5”) if num ==
    6·1 answer
  • Which career involves analyzing various factors that influence the customer decision-making process?
    13·1 answer
  • If your computer won't connect to the internet, which of these is most likely to be the problem?
    8·1 answer
  • I’ll mark brainliest if correct
    10·1 answer
  • Zachary drinks 2 cups of milk per day. He buys 6 quarts of milk. How many days will his 6 quarts of milk last?
    12·1 answer
  • Whats the difference between Input and Output? Give and example of an example on a M:B​
    15·1 answer
  • Write a logical expression using only and, or and not that is equivalent to the Exclusive NOR (XNOR) gate on 2 inputs, called in
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!