Deck 6: User-Defined Functions

Full screen (f)
exit full mode
Question
How many parameters are in the C++ predefined function pow?
Use Space or
up arrow
down arrow
to flip the card.
Question
The C++ function sqrt is of type ____________________.
Question
To use predefined functions in a program, you must include the ____________________ that includes the function specification.
Question
The C++ function toupper returns a(n) ____________________ value.
Question
A value-returning function is used (called) in a(n) ____________________.
Question
void functions do not have a return type.
Question
The code required to accomplish a function's task is called the ____________________ of the function.
Question
An actual parameter is a variable declared in the function heading.
Question
What is a local declaration?
Question
When a return statement executes in a function, the function immediately terminates and the control goes back to the caller.
Question
A return statement must be the last statement in a function.
Question
A(n) ____________________ is a function heading without the body of the function.
Question
What is the syntax of a void function header?
Question
What is the syntax of a void function call?
Question
No information can be passed in and out of void functions without parameters.
Question
A(n) ____________________ identifier is declared outside of every function definition.
Question
Define the scope of an identifier.
Question
The scope of a function name is the same as the scope of a global identifier.
Question
What does these terms refer to:

- \gg Actual parameter:
Question
What does these terms refer to:

- \gg Automatic variable:
Question
What does these terms refer to:

- \gg Body (of a function):
Question
What does these terms refer to:

- \gg Data type (of a function):
Question
What does these terms refer to:

- \gg Definition (of a function):
Question
What does these terms refer to:

- \gg Different formal parameter lists:
Question
What does these terms refer to:

- \gg Driver:
Question
What does these terms refer to:

- \gg External variable:
Question
What does these terms refer to:

- \gg Formal parameter:
Question
What does these terms refer to:

- \gg Function header (heading):
Question
What does these terms refer to:

- \gg Function overloading (overloading a function name):
Question
What does these terms refer to:

- \gg Function prototype:
Question
What does these terms refer to:

- \gg Global identifier:
Question
What does these terms refer to:

- \gg Local declaration:
Question
What does these terms refer to:

- \gg Local identifier:
Question
What does these terms refer to:

- \gg Local variables:
Question
What does these terms refer to:

- \gg Module:
Question
What does these terms refer to:

- \gg Nested block:
Question
What does these terms refer to:

- \gg Parameter:
Question
What does these terms refer to:

- \gg Reference parameter:
Question
What does these terms refer to:

- \gg Return type (of a function):
Question
What does these terms refer to:

- \gg Scope:
Question
What does these terms refer to:

- \gg Scope resolution operator (::):
Question
What does these terms refer to:

- \gg Signature (of a function):
Question
What does these terms refer to:

- \gg Static variable:
Question
What does these terms refer to:

- \gg Stub:
Question
What does these terms refer to:

- \gg Value parameter:
Question
What does these terms refer to:

- \gg Value-returning functions:
Question
What does these terms refer to:

- \gg Void functions:
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/47
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg 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:

- \gg Void functions:
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 47 flashcards in this deck.