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
Global visibility is: Group of answer choices A visibility type where an object A has a semi-permanent reference to another obje
polet [3.4K]

Answer:

the visibility persists as long as both A and B exist.

Explanation:

Global visibility basically means that the visibility persists as long as both A and B exist. In programming global visibility signifies that the variable/data in question is visible from any context of the code. Meaning that it can be accessed and manipulated from any part of the code, even from within a function or another document. This makes it very easy to use and structure accordingly.

5 0
2 years ago
What is cyber safety?
mario62 [17]

Answer: Cyber safety is a process that protects computers and networks. The cyber world is a dangerous place without security and protection.

Explanation: Hope this helps!

7 0
3 years ago
What is the informal language that programmers use to create models of programs that have no syntax rules and are not meant to b
Yuri [45]
Pcode (Pseudo-code).

-----------------------------
5 0
3 years ago
What operating system do you use on your personal computer or mobile device
soldier1979 [14.2K]

The most popular Operating Systems are:

Android

IOS

Windows

5 0
3 years ago
Which part of the Word screen matches label B?
Flura [38]

The part on the Word screen that matches label B is number b because it says what part of the word matches label B. So it would obviously be label B Ribbon.



Hope this helped.


3 0
3 years ago
Other questions:
  • In procedural programming, where does the flow of control usually route from the main function?
    8·1 answer
  • Brenda's working on improving a Google Search Ads quality score so it potentially gets a better ad rank and performs better in t
    9·1 answer
  • You send a report to your boss for feedback and she returns it to you with her edits noted in the electronic file. This Word fea
    11·1 answer
  • The larger the Word Size of a computer
    6·1 answer
  • Consider the following program:
    6·1 answer
  • Mika forgot to put in the function name in his function header for the code below. What would be the best function header?
    12·2 answers
  • Computer software is regarded a bridge between the hardware and software.elaborate the statement outlining types and functions o
    10·1 answer
  • In what century was plastic invented ?​
    9·1 answer
  • What type of platform is SAP?
    9·1 answer
  • What is the purpose of the GETPIVOTDATA function?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!