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.9/5
(86)

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

(Multiple Choice)
4.9/5
(71)

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

(Multiple Choice)
4.8/5
(80)

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.7/5
(88)

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

(Multiple Choice)
4.7/5
(75)

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

(True/False)
4.8/5
(77)

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

(True/False)
4.8/5
(73)

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
(72)

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

(Multiple Choice)
4.9/5
(78)

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

(Multiple Choice)
4.9/5
(85)

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

(True/False)
4.9/5
(83)

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

(True/False)
4.9/5
(65)

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

(Multiple Choice)
5.0/5
(95)

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.9/5
(81)

Which statement below about prototypes and headers is true?

(Multiple Choice)
4.9/5
(67)

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

(Short Answer)
4.8/5
(82)

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

(Multiple Choice)
4.8/5
(76)

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
(84)

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

(Multiple Choice)
4.9/5
(93)

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

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

Filters

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