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
Where can<br>а a<br>radio be found and how<br>they used​
NeX [460]

Answer:

I don't know if I'm the only one who doesn't understand I'm sorry.

Explanation:

6 0
3 years ago
What can be designed to create annoying glitches or destroy data
Katen [24]

I guess the best answer is Virus.

Virus is a malicious computer program that is designed to create annoying glitches or destroy data.

3 0
3 years ago
Read 2 more answers
Please explain in simple words. What does a root do to your tablet? And how do you do it? Is it worth doing it if you only play
nadya68 [22]
Root is a term for android devices similar to "jailbreak" for Apple devices. Rooting gives you basically full control of your device but is considered to be a third party software because you are modifying the operating system. I would watch a YouTube video on how to root your device. I tried to root my device so I could get this screen recording app to work. I think it is really up to you because I think it avoids warranty.
6 0
3 years ago
Code Example 8-1
damaskus [11]

Answer:

Option A: FileNotFoundError

Explanation:

FileNotFoundError is an exception which is thrown when a program fail to open a specified file. The root causes of this type of error can be:

  1. The directory path to locate a target file is wrongly defined in our code due to a typo on the file name or misuse of relative directory path, such as ../ and ./ which denote two different paths.
  2. For some reasons, a target file is misplaced in a wrong directory.

Any one of the above reasons can lead to the exception to be thrown when the file doesn't exist.

6 0
3 years ago
Ai biết cách tra code đáp án trên LMS, Moodle/Quiz không ạ??
mariarad [96]

Answer:

không nhé học đi bạn đừng có cheat hỏng người đấy

Explanation:

4 0
3 years ago
Other questions:
  • Click _______ to add a new column to a table.
    6·2 answers
  • Write a paragraph on the importance of backing up data and mention at least three ways to back up data from your computer.
    15·1 answer
  • With a DUI charge on a driver’s record A. the price of his/her insurance greatly increases. B. he/she may drive only during day
    5·2 answers
  • Heather is troubleshooting a computer at her worksite. She has interviewed the computer’s user and is currently trying to reprod
    12·1 answer
  • In which type of modulation is a 1 distinguished from a 0 by shifting the direction in whichthe wave begins?
    14·1 answer
  • What is a compiler? O a tool used to integrate multiple software programs O a tool used to extract a single software program fro
    13·2 answers
  • Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a Vend
    10·1 answer
  • Scrie un program care citind varstele a 2 copii afiseaza care dintre ei este cel mai mare si cu cat. Exemplu: Pentru varstele 5
    9·1 answer
  • PROGRAM LANGUAGE C
    5·1 answer
  • Help fast fast anyone
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!