NEW
Font size
WorksheetsQuiz 12: Templates, STL
Total questions: 10
Worksheet time: 5mins
What does the T represent in the following statement?
template < class T >
the name of the function template
T stands for Template
a generic data type that is used in a function template
the int data type
What does the word class indicate in the following statement?
template < class T >
class is a key word that is used to precede the type parameter.
It indicates that a class is being derived from an existing class named T.
It indicates that a class named T is being derived from a class named template.
A class named T will automatically be created by the compiler.
A(n) __________ is like a pointer. It is used to access the individual data elements in a container.
element access operator
subscript indicator
global data finder
iterator
The most important data structures in the STL are __________
arrays and structures
lists and groups
containers and iterators
templates and prototypes
The algorithms provided by the STL are implemented as __________ and perform various operations on elements of containers.
virtual functions
function templates
global variables
private data members
A(n) __________ is an abstract data type that stores and retrieves items in a last-in-first-out manner.
array
queue
stack
vector
The __________ operation allows an item to be stored on a stack.
Append
Add
Pop
Push
A dynamic stack has a __________ size and is implemented as a(n) __________.
variable, linked list
fixed, linked list
variable, array
fixed, array
A queue is a data structure that stores and retrieves item in the __________ manner.
last in, first out
first in, last out
first in, first out
random
The __________ operation allows an item to be removed from the stack.
push
pop
delete
remove
