Exam 6: User-Defined Function

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following function prototypes is valid?

(Multiple Choice)
4.8/5
(37)

A variable listed in a header is known as a(n) ____ parameter.

(Multiple Choice)
4.9/5
(32)

Given the function prototype: float test(int, int, int); Which of the following statements is legal?

(Multiple Choice)
4.8/5
(33)

If a function needs to return more than one value, as a rule of good programming style, you should change it to a(n) ____________________ function and use the appropriate reference parameters to return the values.

(Short Answer)
4.8/5
(43)

Functions that do not have a return type are called ____ functions.

(Multiple Choice)
4.8/5
(34)

The function main is always compiled first, regardless of where in the program the function main is placed.

(True/False)
4.8/5
(35)

Using functions greatly enhances a program's readability because it reduces the complexity of the function main.

(True/False)
4.8/5
(41)

Given the following function: what is the output of the following statement? Cout << strange(4, 5) << endl; Given the following function: what is the output of the following statement? Cout << strange(4, 5) << endl;

(Multiple Choice)
4.8/5
(36)

Given the function prototype: ​ Double testAlpha(int u, char v, double t); ​ Which of the following statements is legal?

(Multiple Choice)
4.9/5
(37)

To use the predefined function tolower, the program must include the header file ____.

(Multiple Choice)
4.9/5
(39)

The following return statement returns the value 10. return 10, 16;

(True/False)
4.8/5
(44)

In C++, a function prototype is the function heading without the body of the function.

(True/False)
4.9/5
(35)

A variable or expression listed in a call to a function is called the ____.

(Multiple Choice)
5.0/5
(47)

Given the following function: what is the output of the following statement? Cout << next(next(5)) << endl; Given the following function: what is the output of the following statement? Cout << next(next(5)) << endl;

(Multiple Choice)
4.8/5
(44)

Which statement below about prototypes and headers is true?

(Multiple Choice)
4.8/5
(33)

A function ____________________ is a function that is not fully coded.

(Short Answer)
4.8/5
(33)

The output of the statement: cout << pow(2.0, pow(3.0, 1.0)) << endl; Is ____.

(Multiple Choice)
4.8/5
(35)

Once you write and properly debug a function, you can use it in the program (or different programs) again and again without having to rewrite the same code repeatedly.

(True/False)
4.8/5
(45)

The output of the statement: cout << tolower('$') << endl; Is ____.

(Multiple Choice)
4.9/5
(40)

If the formal parameter list of a function is empty, the parentheses after the function name are not needed.

(True/False)
4.7/5
(35)
Showing 21 - 40 of 41
close modal

Filters

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