Functions part 2 Flashcards

To introduce the concept of scope     2. To understand the difference between static, local and global variables   3. To introduce the concept of functions that return a value

1
Q

Variables of a function that retain their value over multiple calls to the function are called ______ variables.

A

global

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In C++ all functions have _____ scope.

A

local

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Default arguments are usually defined in the ______ of the function.

A

Prototype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A function returning a value should never use pass by ______ parameters.

A

referance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Every function that begins with a data type in the heading, rather than the word void, must have a(n) ________ statement somewhere, usually at the end, in its body of instructions.

A

return

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A(n) _____ is a program that tests a function by simply calling it.

A

driver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In C++ a block boundary is defined with a pair of braces .

A

{ }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A(n) \_\_\_\_\_\_ is a dummy function that just indicates that a 
function was called properly.
A

stub

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Default values are generally not given for pass by ____ parameters.

A

actual

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

functions are functions that have the same name but a different parameter list.

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly