Exam 5: Functions for All Sub Tasks

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The following is legal in a void function return;

(True/False)
4.8/5
(36)

A void function may not be used in an output statement.

(True/False)
4.9/5
(41)

What is the output of the following code fragments? Int trial int& a,int b) { Ifb > a) { A=b; Return -a; } Else { Return 0; } } Float x=0,y=10,z; Z=trialy,x); Cout << z << " " << x <<" " << y << endl;

(Multiple Choice)
4.9/5
(44)

In a function with call-by-reference parameters,the values of the actual arguments are passed to the function.

(True/False)
4.8/5
(35)

What type of value does a void function return? ____________

(Short Answer)
4.8/5
(31)

Given the function definition Void something int a,int& b ) { Int c; C = a + 2; A = a * 3; B = c + a; } What is the output of the following code fragment that invokes something? All variables are of type int.) R = 1; S = 2; T = 3; Somethingt,s); Cout << r << ' ' << s << ' ' << t << endl;

(Multiple Choice)
4.8/5
(33)

Functions can return at most one value.

(True/False)
4.8/5
(31)

Testing a function or program using test values that are at or near the values that change the outcome of the program is known as using

(Multiple Choice)
4.8/5
(38)

A simplified main program used to test functions is called

(Multiple Choice)
4.8/5
(39)

A simplified version of a function which is used to test the main program is called

(Multiple Choice)
4.8/5
(41)

If a function needs to modify more than one variable,it must

(Multiple Choice)
4.8/5
(26)

The values or variables listed in the function declaration are called _________ to the function.

(Short Answer)
4.8/5
(36)

If we want to test if a given function works correctly,we would write a _________ to test it.

(Short Answer)
5.0/5
(35)

A function that does not return a value is known as a ________ function.

(Short Answer)
4.8/5
(38)

What is the output of the following function and function call? Void calculateCostint count,float& subTotal,float& taxCost); Float tax = 0.0, SubTotal = 0.0; CalculateCost15,subTotal,tax); Cout << "The cost for 15 items is " << subtotal << ",and the tax for " << subTotal << " is " << tax << endl; //end of fragment Void calculateCostint count,float& subTotal,float& taxCost) { If count < 10) { SubTotal = count * 0.50; } Else { SubTotal = count * 0.20; } TaxCost = 0.1 * subTotal; }

(Multiple Choice)
4.9/5
(37)

In a function with call-by-reference parameters,any changes to the formal parameters will change the actual arguments passed to the function.

(True/False)
4.7/5
(35)

When a void function is called,it is known as

(Multiple Choice)
5.0/5
(32)

The variables passed a function are called _________.

(Short Answer)
4.7/5
(31)

If you write a function that should use call-by-reference,but forget to include the ampersand,

(Multiple Choice)
4.9/5
(47)

What is the correct way to call the following function? _________________________ void setDisplay);

(Short Answer)
4.9/5
(37)
Showing 21 - 40 of 53
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)