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

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

An actual instance of the function is created in memory when the compiler encounters________________.

(Multiple Choice)
4.8/5
(30)

These are used to signal errors or unexpected events that occur while a program is running.

(Multiple Choice)
4.9/5
(31)

An associative container uses these to access elements rapidly.

(Multiple Choice)
4.8/5
(41)

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

(Multiple Choice)
4.9/5
(34)

Catch blocks serve as ________________.

(Multiple Choice)
4.8/5
(47)

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

(True/False)
4.9/5
(41)

A(n) ___________ is used in a function template to specify a generic data type.

(Multiple Choice)
4.9/5
(36)

A function template prefix is placed before the function header. A class template prefix is placed ______________.

(Multiple Choice)
4.8/5
(41)

In the following statement template <class T> What does the word class indicate?

(Multiple Choice)
4.8/5
(41)

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

(True/False)
4.8/5
(32)

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

(True/False)
4.9/5
(44)

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

(True/False)
4.8/5
(40)

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

(True/False)
4.9/5
(42)

Class templates allow you to create one general version of a class without having to

(Multiple Choice)
4.8/5
(44)

All type parameters defined in a function template must appear at least once in the

(Multiple Choice)
4.9/5
(45)

A(n) _________ is like a pointer. It is used to access the individual data elements in a container.

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
4.8/5
(34)

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

(Multiple Choice)
4.9/5
(37)

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

(Multiple Choice)
4.9/5
(34)
Showing 21 - 39 of 39
close modal

Filters

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