Deck 13: Overloading and Templates
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/21
Play
Full screen (f)
Deck 13: Overloading and Templates
1
What is operator overloading?
Operator overloading allows programmers to extend the definition of most of the built-in operators so that they may be applied to classes.
2
The function heading for an operator function uses the reserved word ____________________.
operator
3
The associativity of an operator can be modified in an overloaded operator function.
False
4
Every object maintains a hidden pointer to itself called the ____________________ pointer.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
5
A(n) ____________________ function is a nonmember function that has access to all the public and private variables of a class.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
6
Which operator functions cannot be overloaded as friend functions?
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
7
The stream extraction and stream insertion operators must be overloaded as member functions.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
8
The body of an overloaded assignment operator should include self-assignments.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
9
C++ simplifies the process of overloading functions by providing ____________________.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
10
Class templates are also called ____________________ types.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
11
Including multiple constructors of a class is an example of function overloading.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
12
A template instantiation can only be created with a built-in type.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
13
What does these terms refer to:
- Class template:
- Class template:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
14
What does these terms refer to:
- Complex number:
- Complex number:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
15
What does these terms refer to:
- Conversion constructor:
- Conversion constructor:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
16
What does these terms refer to:
- Friend function:
- Friend function:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
17
What does these terms refer to:
- Function template:
- Function template:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
18
What does these terms refer to:
- Operator function:
- Operator function:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
19
What does these terms refer to:
- Operator overloading:
- Operator overloading:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
20
What does these terms refer to:
- Parameterized types:
- Parameterized types:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
21
What does these terms refer to:
- Template:
- Template:
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck