C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 15, Problem 15.5E

Fill in the blanks in each of the following statements:

a) The three styles of container classes are first-class containers, _______ and near containers.

b) Containers are divided into four major categories—sequence containers, ordered associative containers, _____ and container adapters.

c) The Standard Library container adapter most closely associated with the first-in, first- out (FIFO) insertion-and-removal discipline is the ______.

d) Built-in arrays, bitsets and valarrays are all _________ containers.
e) A(n) ______ constructor (C++11) moves the contents of an existing container of the same type into a new container, without the overhead of copying each element of the argument container.

f) The _______ container member function returns the number of elements currently in the container.

g) The _______ container member function returns true if the contents of the first container are not equal to the contents of the second; otherwise, returns false.

h) We use iterators with sequences—these be input sequences or output sequences, or they can be _________.

i) The Standard Library algorithms operate a container elements indirectly via _______.

j) Applications with frequent insertions and deletions in the middle and/or at the extremes of a container normally use a(n) ________.

k) Function __________ is available in every first-class container (except forward_list) and
it returns the number of elements currently stored in the container.

l) It can be wasteful to double a vector's size when more space is needed, for example, a full vector of 1,000,000 elements resizes accommodate 2,000.000 elements when a new element is added, leaving 999,999 unused elements. You can use ____ and ______ to control space usage better.

m) As of C++11, you can ask a vector or deque to return unneeded memory to the system by calling member function ____.

n) The associative containers provide direct access to store and retrieve elements via keys (often called search keys). The ordered associative containers are multi set, set, ___ and ___.

o) Classes ____ and ____ provide operations for manipulating sets of values where the values are the keys—there is not a separate value associated with each key.

p) We use C++11’s auto keyword to ____.

q) A multimap is implemented to efficiently locate all values paired with a given ____.

r) The Standard Library container adapters are stack, queue and _____.

Blurred answer
Students have asked these similar questions
Programming Assignment Containers are used to store objects of the same type and provide operations with which these objects can be managed. These operations include object insertion, deletion, and retrieval. Memory is allocated for containers dynamically at runtime. Containers thus provide a safe and easy way to manage collections of objects. The C++ standard library provides various class templates for container management in the Containers Library. These classes can be categorized as follows:  Sequential containers, where the objects are arranged sequentially and access to an object can either be direct or sequential.  Associative containers, where the objects are generally organized and managed in a tree structure and can be referenced using keys. Sequential Containers Sequential containers are distinguished by the operations defined for them, which are either generic or restricted. Restricted operations, such as appending at the end of a container, have constant…
Programming Language C++ Task 1: Write a program to calculate the volume of various containers. A base class, Cylinder, will be created, with its derived classes, also called child classes or sub-classes. First, create a parent class, Cylinder. Create a constant for pi since you will need this for any non-square containers. Use protected for the members. Finally, create a public function that sets the volume. // The formula is: V = pi * (r^2) * h Task 2: Create a derived, or child class for Cylinder, that is, a Cone class. The same function, with the same parameters, is used. However, the formula is different for a cone. // The formula is: V = (1/3) * pi * (r^2) * h Task 3: Test your classes in the main function by creating an instance of Cone and an instance of Cylinder. In each case, call the set_volume function, passing the same parameters. Task 4: Create a derived class for Cone called PartialCone. Add a second radius variable with scope specific to this class (because the top and…
MemoryManagerFirstFit The MemoryManagerFirstFit class is derived from the MemoryManagerBase class. Based on the TODO entries in memory_manager_first_fit.h and memory_manager_first_fit.cpp, implement the functions as instructed.   memory_manager_first_fit.cpp #include "memory_manager_first_fit.h" #include using namespace std; MemoryManagerFirstFit::MemoryManagerFirstFit(int size) { // Set up the list of memory blocks with the info for this initial // unallocated block. memory_block b;    // TODO: Fill in the appropriate values here based on the data elements // you added in the header file. // Add the block to the list of blocks m_blocks.push_back(b); } // Allocate a block of memory of the given size // We will walk through our current list of blocks and // find the block with the first fit. int MemoryManagerFirstFit::allocate(int size, string name) { // TODO: Implement the allocate logic here // // Iterate through the current list of blocks // and find the first one that is big enough…
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Data Members; Author: CppNuts;https://www.youtube.com/watch?v=StlsYRNnWaE;License: Standard YouTube License, CC-BY