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
vlabodo [156]
4 years ago
6

Assume you need to test a function named max. The function max receives two int arguments and returns the larger. Write the defi

nition of driver function testmax whose job it is to determine whether max is correct. So testmax returns true if max is correct and returns false otherwise.
Computers and Technology
1 answer:
padilas [110]4 years ago
3 0

Answer:

bool testmax()                               // function definition

{  

//demonstrating working of the function max

if (max(1,2) == 2 && max(2,1) == 2 && max(1,1)==1)    

return true;                                  // true if the max functions correctly

else  

return false;                                //false for wrong functioning of max

}

Explanation:

Driver function:

A driver function is the one which demonstrates the code of library-style and solves problem. If a code contains some class A, driver functions would be functions that are in your code just to show that class A behaves as expected.

You might be interested in
InJavaScript, a variable declaration is
OverLord2011 [107]

Answer:

Optional

Explanation:

Variable declaration means when you declaring a variable in the code,whenever you want to use a variable you should declare it or define the variable with come constant.

<u>Example</u>

var name ;

The variable has no value after the statement (technically it has undefined value). Declaring a variable without var keyword is not recommended. An current global variable may accidentally be overwritten.

<u>Example</u>

a=2;

The range of variables declared without var keywords becomes global regardless of where they are declared

8 0
3 years ago
Why optical disk is slower than magnetic disk.?​
Mazyrski [523]

Answer:

Answer choices?

Explanation:

5 0
3 years ago
Read 2 more answers
A snail goes up A feet during the day and falls B feet at night. How long does it take him to go up H feet? Given three integer
Ann [662]

Answer:

H=(A*D)-(B*(D-1))

H = A*D- B*D+B

H-B = (A-B)*D

D= (H-B)/(A-B)

Python 3 code

import math

H=int(input('Enter Height: '))

up=int(input('Enter Number of Feet Up: '))

down=int(input('Enter Number of Feet Down: '))

D=(H-down)/(up-down)

print(math.ceil(D),' Days'

Explanation:

The output of the Program is given in the attached file.

8 0
3 years ago
How can a vpn make use of connection types that include multiple channels, and allow for multilink connections?
horsena [70]

Multilink<u> </u>and Bandwidth Allocation Protocol  can a vpn make use of connection types that include multiple channels, and allow for multilink connections

Bandwidth Allocation Protocol (BAP) generally manages the total number of links in a multilink bundle. It is especially valuable to different operations that usually contain carrier charges based on bandwidth utilization.

<h3>What is bandwidth allocation?</h3>

Bandwidth allocation is the process of assigning radio frequencies to different applications. The radio spectrum is a finite resource, which means there is great need for an effective allocation process.

To learn more about Bandwidth allocation, refer

brainly.com/question/14617183

#SPJ4

4 0
2 years ago
On the food inventory worksheet, enter a function in cell G1 that counts the number of Food Items. What formula would i use!? Th
Nataly [62]

COUNT function

COUNT function determines how many cells in a range contain a number. We use this function to get the number of entries in a number field in an array of numbers. The formula one can use is G1:[…..]: = COUNT(G1:[…..])






3 0
3 years ago
Other questions:
  • 50 pts
    12·2 answers
  • One main advantage of CD-ROMs is that
    12·1 answer
  • Patrick Stafford's article argues that the growth of mobile phone usage "has given developers the ability to great robust and en
    7·1 answer
  • A copy machine is available 24 hours a day. On a typical day, the machine produces 100 jobs. Each job takes about 3 minutes on t
    8·1 answer
  • How does the post process alert the user if it detects a hardware problem during the post process?
    6·1 answer
  • In numerical methods, one source of error occurs when we use an approximation for a mathematical expression that would otherwise
    13·1 answer
  • According to the video, what tasks do Carpenters commonly perform? Select four options. supervising Plumbers, Electricians, and
    6·2 answers
  • How to install specific version of create-react-app so.
    10·1 answer
  • What role does the automated surface observing system.
    5·2 answers
  • Testing components for satellites is a classic example of
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!