Deck 6: User-Defined Functions
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/47
Play
Full screen (f)
Deck 6: User-Defined Functions
1
How many parameters are in the C++ predefined function pow?
two
2
The C++ function sqrt is of type ____________________.
double
3
To use predefined functions in a program, you must include the ____________________ that includes the function specification.
header file
4
The C++ function toupper returns a(n) ____________________ value.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
5
A value-returning function is used (called) in a(n) ____________________.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
6
void functions do not have a return type.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
7
The code required to accomplish a function's task is called the ____________________ of the function.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
8
An actual parameter is a variable declared in the function heading.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
9
What is a local declaration?
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
10
When a return statement executes in a function, the function immediately terminates and the control goes back to the caller.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
11
A return statement must be the last statement in a function.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
12
A(n) ____________________ is a function heading without the body of the function.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
13
What is the syntax of a void function header?
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
14
What is the syntax of a void function call?
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
15
No information can be passed in and out of void functions without parameters.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
16
A(n) ____________________ identifier is declared outside of every function definition.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
17
Define the scope of an identifier.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
18
The scope of a function name is the same as the scope of a global identifier.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
19
What does these terms refer to:
- Actual parameter:
- Actual parameter:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
20
What does these terms refer to:
- Automatic variable:
- Automatic variable:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
21
What does these terms refer to:
- Body (of a function):
- Body (of a function):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
22
What does these terms refer to:
- Data type (of a function):
- Data type (of a function):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
23
What does these terms refer to:
- Definition (of a function):
- Definition (of a function):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
24
What does these terms refer to:
- Different formal parameter lists:
- Different formal parameter lists:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
25
What does these terms refer to:
- Driver:
- Driver:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
26
What does these terms refer to:
- External variable:
- External variable:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
27
What does these terms refer to:
- Formal parameter:
- Formal parameter:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
28
What does these terms refer to:
- Function header (heading):
- Function header (heading):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
29
What does these terms refer to:
- Function overloading (overloading a function name):
- Function overloading (overloading a function name):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
30
What does these terms refer to:
- Function prototype:
- Function prototype:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
31
What does these terms refer to:
- Global identifier:
- Global identifier:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
32
What does these terms refer to:
- Local declaration:
- Local declaration:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
33
What does these terms refer to:
- Local identifier:
- Local identifier:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
34
What does these terms refer to:
- Local variables:
- Local variables:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
35
What does these terms refer to:
- Module:
- Module:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
36
What does these terms refer to:
- Nested block:
- Nested block:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
37
What does these terms refer to:
- Parameter:
- Parameter:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
38
What does these terms refer to:
- Reference parameter:
- Reference parameter:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
39
What does these terms refer to:
- Return type (of a function):
- Return type (of a function):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
40
What does these terms refer to:
- Scope:
- Scope:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
41
What does these terms refer to:
- Scope resolution operator (::):
- Scope resolution operator (::):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
42
What does these terms refer to:
- Signature (of a function):
- Signature (of a function):
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
43
What does these terms refer to:
- Static variable:
- Static variable:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
44
What does these terms refer to:
- Stub:
- Stub:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
45
What does these terms refer to:
- Value parameter:
- Value parameter:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
46
What does these terms refer to:
- Value-returning functions:
- Value-returning functions:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
47
What does these terms refer to:
- Void functions:
- Void functions:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck