Exam 5: Sequential Containers
Exam 1: P A C++ Primer25 Questions
Exam 2: Introduction to Software Design24 Questions
Exam 3: Program Correctness and Efficiency25 Questions
Exam 4: Inheritance and Class Hierarchies25 Questions
Exam 5: Sequential Containers25 Questions
Exam 6: Stacks24 Questions
Exam 7: Queues and Deques25 Questions
Exam 8: Recursion25 Questions
Exam 9: Trees25 Questions
Exam 10: Sets and Maps25 Questions
Exam 11: Sorting25 Questions
Exam 12: Self-Balancing Search Trees25 Questions
Exam 13: Graphs25 Questions
Exam 14: Advanced C++ Topics, and Overview of UML25 Questions
Select questions type
The associative containers are designed for fast retrieval of data based on a unique value stored in each item, called its __________.
Free
(Short Answer)
4.9/5
(45)
Correct Answer:
key
For class types, assignment is done by what is appropriately known as the __________ operator.
Free
(Short Answer)
4.9/5
(36)
Correct Answer:
assignment
You can create a __________ liked list by linking the last node to the first node (and the first node to the last one).
Free
(Multiple Choice)
4.9/5
(31)
Correct Answer:
B
The variable called "this" is a(n) __________ to the object to which a member function is applied.
(Short Answer)
4.8/5
(32)
In the context of iterators, a(n) __________ represents a common interface that a generic class must meet.
(Short Answer)
4.9/5
(42)
If you remove an element from a vector object, the size automatically decreases.
(True/False)
4.7/5
(38)
What value is output after the final line in the following code segment executes?


(Multiple Choice)
4.8/5
(34)
Because a list and a vector have several member functions in common, they may be used polymorphically.
(True/False)
4.8/5
(40)
Most of the user-defined operational expense in the KW::vector class reserve function is attributable to the for loop excerpted below.
Using order of growth techniques against this code fragment, we can estimate that each reallocation of reserve () is __________.

(Multiple Choice)
4.8/5
(33)
The template functions, or __________perform fairly standard operations on containers, such as applying the same function to each element (for_each), copying values from one container to another (copy), searching a container for a target value (find, find_if), or sorting a container (sort).
(Multiple Choice)
4.9/5
(38)
Which line will properly complete the definition for KW::iterator class postfix increment operator?
Iterator operator++(int) {
Iterator return_value = *this;
__________
Return return_value;
}
(Multiple Choice)
4.7/5
(39)
To insert an item into the middle of the array, the values that are at the __________ point and beyond must be shifted over to make room.
(Multiple Choice)
4.8/5
(31)
A template class is a class that stores and processes a collection of information.
(True/False)
4.7/5
(38)
Even if we have to reallocate in a call to KW::vector class insert (), the cost of the operation would still be O(__________).
(Short Answer)
4.9/5
(38)
The for loop below is designed to populate an int type vector named my_vector with the first ten odd positive integers. Using the vector class at() function, complete the for loop.
for (int index = 0; index ++; index < 10)
__________
(Short Answer)
4.9/5
(39)
Which of the following headers changes the subscript operator defined below so that it returns a non-modifiable reference?


(Multiple Choice)
4.9/5
(30)
Provide the code that completes the definition of the STL template find function below.


(Short Answer)
4.8/5
(41)
A(n) __________ is a moving place marker that can be advanced forward (using operator++) or backward (using operator--).
(Short Answer)
4.7/5
(31)
The purpose of the copy constructor is to create a shallow copy of an object.
(True/False)
4.8/5
(35)
Showing 1 - 20 of 25
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)