Exam 6: User-Defined Function

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

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

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

(True/False)
4.9/5
(65)

The statement: return 8, 10; returns the value ____.

(Multiple Choice)
5.0/5
(82)

Which of the following function prototypes is valid?

(Multiple Choice)
4.8/5
(88)

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

(Multiple Choice)
5.0/5
(85)

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

(Multiple Choice)
4.8/5
(70)

The standard header file for the abs(x)function is ____.

(Multiple Choice)
4.8/5
(80)

The following function heading in a C++ program is valid:int funcExp(int u, char v, float g)

(True/False)
4.9/5
(84)

The statement: return 37, y, 2 * 3; returns the value ____.

(Multiple Choice)
4.9/5
(86)

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

Which statement below about prototypes and headers is true?

(Multiple Choice)
4.8/5
(81)

What value is returned by the following return statement? int x = 5; Return x + 1;

(Multiple Choice)
4.8/5
(82)

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

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

(True/False)
4.8/5
(78)

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

(Short Answer)
4.9/5
(76)

A function prototype is ____.

(Multiple Choice)
5.0/5
(76)

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

(True/False)
4.8/5
(80)

The execution of a return statement in a user-defined function terminates the program.

(True/False)
4.9/5
(91)

The data type of a variable in a return statement must match the function type.

(True/False)
4.9/5
(88)

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
(82)
Showing 21 - 40 of 41
close modal

Filters

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