Exam 4: Procedural Abstraction and Functions That Return a Value

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

When a variable is local to a function, we say that it has ___ of the function

(Multiple Choice)
4.9/5
(37)

The expression static_cast<double>3) is called a

(Multiple Choice)
4.8/5
(37)

the fabsdouble num) function

(Multiple Choice)
4.8/5
(38)

When you want to use a function in your program, you would make a function __________.

(Short Answer)
4.8/5
(36)

If you need to write a function that will compute the cost of some candy, where each piece costs 25 cents, which would be an appropriate function declaration?

(Multiple Choice)
4.7/5
(30)

What is the output of the following function call? //function body Int factorialint n) { Int product=0; Whilen > 0) { Product = product * n; N-; } Return product; } //function call Cout << factorial4);

(Multiple Choice)
4.9/5
(36)

Multiple arguments to a function are separated by

(Multiple Choice)
4.8/5
(43)

What is the output of the following program fragment? Cout << static_cast<double>3)/4 << endl;

(Multiple Choice)
4.9/5
(38)

The ______________ describes how the function will work.

(Short Answer)
4.9/5
(32)

Constant variables that might be used in different functions should be _________

(Short Answer)
4.9/5
(33)

pow2,3) is the same as pow3,2).

(True/False)
4.8/5
(43)

What is the output produced by the following code fragment? int i = 3; cout << "The value of i is " << sqrtpowi,4.0)) << endl;

(Short Answer)
4.7/5
(36)

If you have the two functions as shown, Int someFunctionint value); Float someFunctionfloat value); And a variable x, which is a double, which function is called by the following statement? Cout << someFunctionx);

(Multiple Choice)
4.9/5
(38)
Showing 41 - 53 of 53
close modal

Filters

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