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 is number system?<br>​
MrMuchimi

Answer:

A numeral system is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner. The same sequence of symbols may represent different numbers in different numeral systems.

Explanation:

8 0
2 years ago
Data with values that change continuously or smoothly over time is known as:
Alexeev081 [22]

Answer:

A.  \:  \boxed{analog  \: data}

5 0
3 years ago
Read 2 more answers
Which of the following statements is false?
SOVA2 [1]
People can use software to make their lives more enjoyable
5 0
2 years ago
Six causes of data lost
Serhud [2]
Hard drive failures

Accidental deletions

Computer viruses and malware infections



Power failures
6 0
3 years ago
What is the difference between cd-r, cd-rw and cd-rom​
insens350 [35]

Answer:

The answer to this question is given below in this explanation section.

Explanation:

          "difference between cd-r, cd-rw and cd-rom​"

CDs are also known as WORM discs,for "write once Read many".A re writable version based on excitable crystals and known as CD-RW was introduced in the mid 1990s because both CD-R and CD-RW recorders originally required a computer to operate  they had limited acceptance of use as computer software.

  A compact Disc Read only memory (CD-ROM) is a read only disc.A compact disc Re-writable (CD-RW) is an erasable disc that can be reused.The data  on a CD-RW disc can be erased and recorded over numerous times.CD-RW may not be readable outside of the drive it was created in.

cd-r :

          CD-R is a digital optical disc storage format.A CD-R disc is compact disc that can be written once and read arbitrarily many times.

          CD-R stand for" compact disc" Record-able .CD-R disc are blank CDs that can record data written by a CD burner.The word "record-able" is used because CD-R are often used to record audio,Which can be play back by most CD players.

cd-rw:

           CD-RW compact disc re-writable is a digital optical disc,storage format introduced in 1997.A CD-RW compact disc can be written read erased and re-written.

in this case of CD-RW the writing laser makes permanent marks in a layers of dye polymer in the disc.CD rewrite-able discs in a similar fashion,except that the change to the recording surface is revers able.

cd-rom:

         CD-Rom observation of compact disc read only memory type of computer memory in the form of compact disc that is read by optical means.A CD-ROM drive uses a low power laser been encoded in the form of tiny pits on a optical disk.The "ROM" part of the term means the data on the disc "read only memory" or cannot be altered or erased.

8 0
2 years ago
Other questions:
  • The main differences between laptops and desktop computers other than size and portability.
    14·1 answer
  • The true or false questions.
    5·1 answer
  • Seth is considering advertising his business using paid search results.What do you think makes paid search advertising so effect
    11·2 answers
  • Write a C# solution for the following problem. Submit your .cs file to this link. Sample output(s) attached. == Create an Employ
    5·1 answer
  • Which is NOT a benefit of using visual aids?
    9·2 answers
  • Iman has 48 months to save $18,000, the maximum amount he estimates his first year of college will cost. He does not want to dep
    7·2 answers
  • Design the following webpage using suitable html code .
    11·2 answers
  • Choose the response that best completes the following statement.
    5·1 answer
  • A start-up is expanding overseas and spends an excessive amount of time on recruiting and hiring activities, hindering its abili
    12·1 answer
  • A continuous and differentiable function f(x) with the following properties: f(x) is decreasing at x=−5 f(x) has a local minimum
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!