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
Fill in the blank with the correct response.
Verizon [17]

Answer:

File structure.

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations of a web page to be displayed.

The file transfer protocol (FTP) client component of a full-featured HTML editor allows you to synchronize the entire file structure. Therefore, when you wish to share your entire html document over a network server such as a FTP client, you should use a full-featured HTML editor.

6 0
3 years ago
Create a Python program to solve a simple pay calculation.
Travka [436]

Answer:

def weeklyPaid(hours_worked, wage):  

   if hours_worked > 40:  

       return 40 * wage + (hours_worked - 40) * wage * 1.5

   else:  

       return hours_worked * wage  

 

 

hours_worked = 50

wage = 100

 

pay = weeklyPaid(hours_worked, wage)  

 

print(f"Total gross pay: Rs.{pay:.2f} ")

Explanation:

provides gross pay

6 0
3 years ago
The laws governing search and seizure in the public sector are much more straightforward than those in the private sector. TRUE
Lapatulllka [165]

Answer:

True

Explanation:

Because of the contract that you have agreed to when joining the work force. Which is different from the private sector.

7 0
3 years ago
This project was used to drive the VR Robot to number 25 on the Number Grid
Ludmilka [50]

Answer:

B Wait until position y in millimeter should be greater than 500 at least im guessing because you didnt add what the map looked like, making my job MUCH harder

Explanation:

3 0
3 years ago
A company sells 12-month subscriptions to popular magazines. During the month of may, the company sells $10,000 in magazines, wh
Korvikt [17]

Good is for aware consumers who value quality of life, fashion, and the environment. The areas of home, fashion, gardening, crafts, travel, health, and beauty are all covered in each issue of Good.

<h3>What journal entry to record the sales not yet earned?</h3>

When a business sells any merchandise to a third party on credit, an entry called a sales credit journal entry is made in the company's sales journal.

There is usually a selection of delectable dishes as well as professional advice on relationships, wellness, and nutrition.

Therefore,  In this instance, the sales account is credited in proportion to the debit to the debtor's account or account receivable account.

Learn more about journal entry here:

brainly.com/question/20421012

#SPJ1

4 0
1 year ago
Other questions:
  • Write a Python function merge_dict that takes two dictionaries(d1, d2) as parameters, and returns a modified dictionary(d1) cons
    5·1 answer
  • Canadian Tire is one of Canada’s largest companies. They operate four large distribution centers service over 470 tire retail ou
    5·1 answer
  • _______ can be used to prevent busy waiting when implementing a semaphore.
    15·1 answer
  • After spending a year in India, Giovanna returns home to the United States and is inspired to raise money to help her new friend
    14·1 answer
  • An interface does not have ____.
    13·1 answer
  • The file includes 4993 tweets including the keyword 'election'. Each tweet is represented in a separate line. Write a program to
    9·1 answer
  • What is the purpose of file extensions? A. They execute the mail merge function, B. They tell the operating system what kind of
    15·2 answers
  • Is this statement true or false? You can apply only one of these at a time: underline, bold, or italics. true false
    5·1 answer
  • Select the correct answer.
    5·1 answer
  • Which of the following are responsibilities of information security management? Defining the protection required for systems and
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!