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
mart [117]
2 years ago
5

Which function calls would provide the most helpful test of this function? Remember: With tests, you are attempting to figure ou

t all the possible ways the function could be broken.
function findMin(num1, num2){
if(num1 < num2){
return num1;
} else {
return num2;
}
}
A. findMin(-1, 0)
findMin(2,4)
findMin(5,10)
B. findMin(5,3)
findMin(7,2)
findMin(5,1)
C. findMin(1,1)
findMin(-2,2)
findMin(0,3)
D. findMin(-1,1)
findMin(1,-1)
findMin(1,1)
Computers and Technology
1 answer:
statuscvo [17]2 years ago
5 0

Answer:

D

Explanation:

You might be interested in
Write a program that use a switch statement whose controlling expression is the variable area code. If the value of area_code is
scZoUnD [109]

Answer:

Table for Area codes are not missing;

See Attachment for area codes and major city I used

This program will be implemented using c++ programming language.

// Comments are used for explanatory purposes

// Program starts here

#include <iostream>

using namespace std;

int main( )

{

// Declare Variable area_code

int area_code;

// Prompt response from user

cout<<Enter your area code: ";

cin<<"area_code;

// Start switch statement

switch (area_code) {

// Major city Albany has 1 area code: 229...

case 229:

cout<<"Albany\n";

break;

// Major city Atlanta has 4 area codes: 404, 470 678 and 770

case 404:

case 470:

case 678:

case 770:

cout<<"Atlanta\n";

break;

//Major city Columbus has 2 area code:706 and 762...

case 706:

case 762:

cout<<"Columbus\n";

break;

//Major city Macon has 1 area code: 478...

case 478:

cout<<"Macon\n";

break;

//Major city Savannah has 1 area code: 912..

case 912:

cout<<"Savannah\n";

break;

default:

cout<<"Area code not recognized\n";

}

return 0;

}

// End of Program

The syntax used for the above program is; om

6 0
3 years ago
Convert the decimal number 164 into the equivalent 8 bit binary number. ​
umka2103 [35]

Answer:

10100100

Explanation:

8 bit system consists of 8 bits or 8 positions and each of them can have binary value (0 or 1).

Each bit is equivalent to a certain power of number 2. Important to know is that you read these bits from right to left.

So, this means that the bit furthest to the right has the value of 2^0, which is 1. The bit to the left has the value of 2^1, which is 2. Next one is 2^2, which is 4 etc. This means that the bit furthest to the left has the value of 2^7, which is 128.

The bit has this potential value only if value 1 if is in its position. If the value is 0 then, regardless of position, value of the bit is 0.

Decimal value of the number is calculated when we add all the values of the bits marked with 1.

So, we're dealing with number 164. We already said that leftmost bit has the value of 128 if it's marked with 1:

1 0 0 0 0 0 0 0 = 128

Next bit has the value of 64, but 128+64 would exceed the value of our number, so the second leftmost bit remains 0.

Next bit has the value of 32, 128+32 is 160, which is less then our number, so we mark the third bit with 1:

1 0 1 0 0 0 0 0 = 160

Similarly, we continue down the line. We only need 4 to reach the value of our number, so we'll mark with 1 the bit that has the value of 4, which leaves us with the solution:

1 0 1 0 0 1 0 0 = 164

7 0
3 years ago
A _____ cloud allows an organization to take advantage of the scalability and cost-effectiveness that a public cloud computing e
balu736 [363]

Answer:

Hybrid

Explanation:

Hybrid cloud is a solution that combines a private cloud with one or more public cloud services, with proprietary software enabling communication between each distinct service.

5 0
3 years ago
With an example in each, describe the use of two basic functions which are known by the "string.h" header file.
olga nikolaevna [1]

Answer:

strcmp(char * A, char * B);

strcat(char * A, char * B)

Explanation:

One of these basic functions is the function strcmp(char * A, char * B).

This functions compares if two strings are equal; If they are, it returns 0. If not, it returns 1;

So, an example:

char A[13] = "Buffalo Bills";

char B[13] = "Buffalo Bills";

if (strcmp(A,B) == 0)

printf("The strings are the same\n);

else

printf("The strings are not the same");

In this case, they are the same.

----------------------

If for example:

char B[13] = "Buffalo Billz"

It would fall in the else, A and B would not be the same strings.

--------------------------

Other function is the strcat(char * A, char * B);

This function takes two strings as an input, and concatenate them to the first.

For example:

char A[15] = "Buffalo";

char B[5] = "Bills";

strcat(A, B);

printf("%s\n", A);

The output is:

Buffalo Bills

5 0
3 years ago
Press the ENTER key to do what?
Blababa [14]
Change the line in word, it basically returns
7 0
3 years ago
Other questions:
  • Reputable firms often ask recent graduates to pay an up-front fee for a job.
    12·2 answers
  • What component of a motherboard is not considered to be a field replaceable unit?
    12·1 answer
  • 4. Extrusion tools in Blender® duplicate vertices while keeping the geometry connected with the original vertices. (1 point)
    7·1 answer
  • Anicius boethius invented a system that made possible the memorization and written transmission of melodies.
    9·1 answer
  • Plz help me of this answer<br><br><br>language:python​
    7·2 answers
  • An ironworker standing 30 feet in the air is safe wearing a full body harness that is not tied off
    15·2 answers
  • Identify the benefit of modeling to communicate a solution.
    10·1 answer
  • PLEASE HELP!!!!!!!!!
    8·1 answer
  • Cuantos MB son 8,192 kb?​
    13·1 answer
  • A non-profit organization decides to use an accounting software solution designed for non-profits. The solution is hosted on a c
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!