Exam 6: Functions

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

A local variable and a global variable may not have the same name within the same program.

Free
(True/False)
4.8/5
(79)
Correct Answer:
Verified

False

Which line in the following program contains a call to the showDub function? Which line in the following program contains a call to the showDub function?

Free
(Multiple Choice)
4.8/5
(85)
Correct Answer:
Verified

C

A parameter is a special-purpose variable that is declared inside the parentheses of a function definition.

Free
(True/False)
4.9/5
(77)
Correct Answer:
Verified

True

________ functions may have the same name, as long as their parameter lists are different.

(Multiple Choice)
4.9/5
(83)

The value in this type of local variable persists between function calls.

(Multiple Choice)
5.0/5
(85)

This type of variable is defined inside a function and is not accessible outside the function.

(Multiple Choice)
4.8/5
(89)

A ________ variable is declared outside all functions.

(Multiple Choice)
4.8/5
(79)

Look at the following function prototype. Look at the following function prototype.    What is the data type of the function's return value? What is the data type of the function's return value?

(Multiple Choice)
4.7/5
(90)

One reason for using functions is to break programs into manageable units, or modules.

(True/False)
4.9/5
(87)

What is the output of the following program? What is the output of the following program?

(Multiple Choice)
4.8/5
(78)

These types of arguments are passed to parameters automatically if no argument is provided in the function call.

(Multiple Choice)
5.0/5
(83)

If a function does not have a prototype, default arguments may be specified in the function ________.

(Multiple Choice)
4.9/5
(81)

You may use the exit()function to terminate a program, regardless of which control mechanism is executing.

(True/False)
4.8/5
(85)

Look at the following function prototype. Look at the following function prototype.   What is the data type of the function's parameter variable? What is the data type of the function's parameter variable?

(Multiple Choice)
4.7/5
(83)

A function can have zero to many parameters, and it can return this many values.

(Multiple Choice)
4.9/5
(94)

A static variable that is defined within a function is initialized only once, the first time the function is called.

(True/False)
4.8/5
(74)

This function causes a program to terminate, regardless of which function or control mechanism is executing.

(Multiple Choice)
4.9/5
(66)

The value in a ________ variable persists between function calls.

(Multiple Choice)
4.9/5
(95)

This statement causes a function to end.

(Multiple Choice)
4.9/5
(61)

Which of the following statements about global variables is true?

(Multiple Choice)
4.8/5
(81)
Showing 1 - 20 of 49
close modal

Filters

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