Exam 11: Using Templates

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

The keyword ____ can replace class in a template definition in some C++ compilers.

(Multiple Choice)
4.8/5
(38)

To create a class template, you begin with the template ____.

(Multiple Choice)
4.8/5
(38)

Explain why overloading can sometimes require a lot of unnecessary, tedious coding.

(Essay)
4.9/5
(25)

A ____ is a data structure in which elements are removed in the same order they were entered.

(Multiple Choice)
4.7/5
(31)

You can use multiple explicit types when you call a template function.

(True/False)
4.9/5
(29)

You can calculate the size of an array (the number of elements) called nums as follows ____.

(Multiple Choice)
4.7/5
(38)

Provide an example of an overloaded function template.

(Essay)
4.8/5
(36)

The terms template class and ____________________ are often used interchangeably.

(Short Answer)
4.8/5
(36)

If doubleVal() is a function template that takes one parameterized type, doubleVal (a) is exactly the same as ____.

(Short Answer)
4.8/5
(27)

Because a generic linked list class is so useful, the developers of C++ have already created such a container class: its name is ____, and it contains functions such as merge() and reverse() .

(Multiple Choice)
4.8/5
(34)

Write the class definition for a Number class that has one data member which can hold any number, a constructor that takes an argument, and a displayNumber() function.

(Essay)
4.9/5
(44)

Different versions of ____________________ function templates do not need to use the same identifier to stand in for the variable type or class.

(Short Answer)
4.9/5
(40)

Which of the following is not a common task to perform with an array?

(Multiple Choice)
4.7/5
(40)

What are common uses of template classes?

(Essay)
4.8/5
(36)
Showing 41 - 54 of 54
close modal

Filters

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