Exam 16: Exceptions, Templates, and the Standard Template Library Stl

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

A(n)________ is a value or an object that signals an error.

Free
(Multiple Choice)
5.0/5
(39)
Correct Answer:
Verified

D

If an exception is thrown by a member function of a class object, then the class ________ is called.

Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
Verified

B

Using a function template requires less code than overloading a function.

Free
(True/False)
4.8/5
(33)
Correct Answer:
Verified

True

To handle an exception that has been thrown, a program must have a(n)________.

(Multiple Choice)
4.9/5
(36)

How much memory is reserved for a function template?

(Multiple Choice)
4.7/5
(37)

In the following statement: In the following statement:   What does T represent? What does T represent?

(Multiple Choice)
4.9/5
(34)

Two types of container classes in the STL are:

(Multiple Choice)
4.8/5
(42)

The try/catch/throw construct is able to handle only one type of exception in a try block.

(True/False)
4.8/5
(44)

The algorithms provided by the STL are implemented as ________, and perform various operations on elements of containers.

(Multiple Choice)
4.9/5
(38)

The try block is immediately followed by one or more ________.

(Multiple Choice)
4.7/5
(43)

Catch blocks serve as ________.

(Multiple Choice)
4.8/5
(40)

The three sequence container objects provided by the STL are:

(Multiple Choice)
4.9/5
(37)

If an exception is not caught, it is stored for later use.

(True/False)
4.7/5
(41)

The ________ starts with the key word try, and is followed by a block of code executing any statements that might cause an exception to be thrown.

(Multiple Choice)
4.8/5
(46)

Types of iterators are ________.

(Multiple Choice)
5.0/5
(35)

There is no difference between declaring an object of an ordinary class and an object of a template class.

(True/False)
5.0/5
(34)

A sequence container organizes data in a sequential fashion, similar to an array.

(True/False)
4.9/5
(31)

When you declare an iterator to work with a container, the compiler automatically chooses the right type.

(True/False)
4.9/5
(36)

A function template's prefix contains ________ enclosed in angled brackets.

(Multiple Choice)
4.9/5
(33)

Function templates allow you to write a single function definition that works with many different data types.

(True/False)
4.8/5
(43)
Showing 1 - 20 of 39
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)