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 kind of video are you are able to watch by downloading it from the Internet?
Helen [10]

Answer: Digital Video

Explanation: So basically, online content videos on the internet are in the form of encoded digital data displayed in rapid succession. Such kind of data therefore can be streamed in a digital video.

4 0
3 years ago
When you include a word cover page in a multi page document, the cover page is not considered the first page. True or false?
____ [38]
It ture on the cover page include
4 0
3 years ago
Is it true that if the user log out the computer will turn off automatically​
sergiy2304 [10]
Yes that is a true statement
8 0
3 years ago
Read 2 more answers
Which term describes an event where a person who does not have the required clearance or access caveats comes into possession of
notka56 [123]

Answer:

The answer is "compromise"

Explanation:

In computer science, the comprised system is used to describe as any technological resource, that has been negatively affected by an untrustworthy source for nondisclosure, integrity or accessibility either deliberately or inadvertently.

  • In this, the mechanical interaction from the unauthorized source or technological progress can result in compromise.
  • This helps you and the partner to meet each other's interests by taking into consideration both the positions and the solution to the main problem.

4 0
3 years ago
Read 2 more answers
How will I go about conducting the investigation on fake news
Leno4ka [110]

Answer:

You can begin your report, and write about CNN, BBC, or any other liberal news network.

Explanation:

5 0
3 years ago
Other questions:
  • Discuss Hashing and how it is utilized within the IT industry. Also, discuss how Hashing can improve our sorting and searching r
    12·1 answer
  • Write a class called Counter that represents a simple tally counter, which might be used to count people as they enter a room. T
    9·1 answer
  • How can you be more efficient on the internet? No more than two sentences (Cause i need to do the problem by myself mostly) Than
    7·2 answers
  • What should you do prior to writing your business document?
    11·1 answer
  • A web page ____ can also create a style sheet that takes precedence over the internal style sheets of browsers.
    10·1 answer
  • When projecting a presentation on a large screen, what should your minimum font size be?
    6·2 answers
  • Define Indentation
    8·1 answer
  • Write down the bit pattern in the fraction of value 1/3 assuming a floating point format that uses Binary Coded Decimal (base 10
    10·1 answer
  • The relation LIBRARY records books currently on loan to students. Each book has one ISBN_NO The library has several copies of ea
    14·1 answer
  • How are 1gls different from 2gls​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!