Exam 6: Functions

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

Breaking a program up into a set of manageable sized functions is called ________ programming.

(Multiple Choice)
4.8/5
(24)

A function with a return type of bool must return a value of either True or false.

(True/False)
4.9/5
(33)

A function other than the main function is executed

(Multiple Choice)
4.8/5
(27)

If a function has no return statement, the flow of control moves to the next function in the file when the closing brace of the function body is reached.

(True/False)
4.9/5
(26)

You may use the exit() function to return the flow of control from a function back to main() regardless of where the function was called from.

(True/False)
4.8/5
(31)

A function ________ is a statement that causes a function to execute.

(Multiple Choice)
4.8/5
(40)

When you make a function call, the order of the arguments you send does not matter as long as the number of arguments matches the number of parameters the function has.

(True/False)
4.7/5
(43)

The ________ function causes the entire program to terminate, regardless of which function or control mechanism is executing.

(Multiple Choice)
4.9/5
(35)

A(n) ________ argument is one that is automatically passed to a parameter when the argument is left out of the function call.

(Multiple Choice)
4.8/5
(40)

A ________ variable is declared outside all functions.

(Multiple Choice)
4.9/5
(38)

Both function headers and function calls must list the data types of all data being passed to the function.

(True/False)
4.9/5
(36)

A function can have zero to many parameters and either zero or one return value(s).

(True/False)
4.8/5
(35)

Although global variables can be useful, it is considered good programming practice to restrict your use of them.

(True/False)
4.7/5
(37)

When a function just needs to use a copy of an argument passed to it, the argument should normally be passed by value.

(True/False)
4.8/5
(28)

A ________ is a program module whose purpose is to test other modules by calling them.

(Multiple Choice)
4.8/5
(26)

In a function header, in addition to the name of the function, you are required to furnish

(Multiple Choice)
4.9/5
(29)

A void function is one that

(Multiple Choice)
4.8/5
(35)

Two or more functions may have the same name provided that

(Multiple Choice)
4.9/5
(38)

Functions are ideal for use in menu-drive programs. When a user selects a menu item, the program can call an appropriate function to carry out the user's choice.

(True/False)
4.8/5
(32)

A function can have ________ parameters, and it can have either zero or one return value(s).

(Multiple Choice)
4.7/5
(41)
Showing 21 - 40 of 40
close modal

Filters

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