Answer the following statements true (T) or false (F)

1. You can assign stacks of the same base type
2. You cannot copy stacks.
3. The template stack and queue adapters have a copy constructor, an overloaded operator assignment, and a destructor.
4. The associative containers store their data in an order different from the insertion order.
5. The set container keeps track of how many copies of a data item you insert in the set object.

1. True
Template stack adapters have operator assignment defined.
2. False
The stack template adaptor has a copy constructor.
3. True
These adapters have the BIG THREE, which is the copy constructor, the overloaded operator assignment and the destructor. Both the stack and queue adaptor have all three.
4. True
In order to be able to find data quickly, the associative containers store the data in sorted order.
5. False
In this respect the set container behaves like the mathematical set. Inserting β€˜A’ into a set of char multiple times has no effect after the first insertion. This is like a attempting to turn on a toggle switch that is already on, no matter how many times you push it towards β€œon”, nothing changes.

Computer Science & Information Technology

You might also like to view...

Which part of a folder window displays the most common properties associated with a selected file?

A) Details pane B) Folders pane C) Content pane D) Navigation pane

Computer Science & Information Technology

What US government classification label is applied to information that, if disclosed, could cause serious damage to national security and also requires that the damage that would be caused is able to be described or identified by the classification authority?

A. Classified B. Secret C. Confidential D. Top Secret

Computer Science & Information Technology