CICS 38357

subject Type Homework Help
subject Pages 13
subject Words 383
subject Authors D. S. Malik

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
A ____ contains a function that can be treated as a function using the function call
operator, ().
a. function object
b. reference object
c. property object
d. value object
The containers map and multimap manage their elements in the form ____.
a. key/pair
b. name/value
c. value/pair
d. index/key
The algorithm ____ is used to find the elements that are contained in two ranges of
elements.
a. find_union
b. union
page-pf2
c. set_union
d. has_union
Every call to a recursive function has its own code and its own set of ____ and local
variables.
a. headers
b. parameters
c. stack
d. heap
In heapsort, after we convert the array into a heap, the ____ phase begins.
a. division
b. merging
c. inserting
d. sorting
page-pf3
The class ____ contains member functions that can be used to find the number of
elements currently in the container, the maximum number of elements that can be
inserted in a container, and so on.
a. container
b. element
c. template
d. vector
The operation ____ reinitializes the stack to an empty state.
a. alloc
b. init
c. initializeStack
d. new
page-pf4
When the function terminates, its memory space is ____.
a. allocated
b. recycled
c. left intact
d. deallocated
To define new classes, you create new ____ files.
a. header
b. friend
c. prototype
d. placeholder
A(n) ____ typically serves to initialize the member variables of a derived class.
a. inheritor
b. initiator
page-pf5
c. deconstructor
d. constructor
A(n) ____ is a data type that separates the logical properties from the implementation
details.
a. public
b. protected
c. private
d. abstract data type
Let G be a directed graph and V(G) = {v1, v2, . . ., vn}, where n >= 0. A(n) ____ of V(G)
is a linear ordering vi1, vi2, . . ., vin of the vertices such that, if vijis a predecessor of vik, j
does not equal k, 1 <= j <= n, 1 <= k <= n, then vij precedes vik, that is, j < k in this
linear ordering.
a. ontological ordering
b. orthogonal ordering
c. topological ordering
page-pf6
d. typographical ordering
In a doubly linked list, every node contains the address of the next node except for the
____ node.
a. middle
b. last
c. first
d. second to last
In the average case of quicksort, the number of key comparisons is ____.
a. O(n)
b. 1.39nlog2n + O(n)
c. 2.39logn + O(n)
d. 1.39nlog2n + O(2n)
page-pf7
In a ____ queue, customers or jobs with higher priorities are pushed to the front of the
queue.
a. structured
b. divided
c. priority
d. hold
A doubly linked list can be traversed in ____ direction.
a. only the forward
b. only the backward
c. a circular
d. either the forward or backward
page-pf8
Both the containers set and multiset automatically sort their elements according to some
sort criteria.
The function ____ is called whenever an error is discovered in the expression.
a. clearExp
b. discardExp
c. newExp
d. evaluateExp
Deciding which member to make private and which to make public depends on the
____ of the member.
a. nature
b. size
c. function
d. identity
page-pf9
To include a header file in a program, you use the preprocessor command ____.
a. pragma
b. fetch
c. pull
d. include
If the list is stored in an array, we can traverse the list in either direction using an ____.
a. interface variable
b. increment variable
c. index variable
d. iterator variable
page-pfa
Trailer nodes at the end of the list should contain a value ____.
a. smaller than the largest value in the data set
b. larger than the largest value in the data set
c. smaller than the smallest value in the data set
d. the same size as the smallest value in the data set
Inserting the new element in the first available position in the list ensures that the array
holding the list is a complete ____.
a. binary tree
b. heap
c. selection tree
d. forest
The ____ is an item's location in the array.
a. counter
b. probe
page-pfb
c. index
d. key
The operation ____ initializes the queue to an empty state.
a. initializeQueue
b. wipeQueue
c. newQueue
d. cleanQueue
The ____ operation on a queue removes the next element in the queue.
a. front
b. back
c. pop
d. push(item)
page-pfc
The algorithm ____ merges the sorted lists.
a. combine
b. merge
c. resort
d. concatenate
If there are three classes, shape, circle, and square, what is the most likely relationship
among them?
a. The square class is a base class, and shape and circle are derived classes of square.
b. The shape class is a base class, and circle and square are derived classes of shape.
c. The shape, circle, and square classes are all sibling classes.
d. These three classes cannot be related.
page-pfd
Containers are essentially used ____.
a. to manipulate data
b. to step through a set of given elements
c. to manage objects of a given type
d. to update objects that are part of a given set of elements
One way to improve linear probing is to skip array positions by a ____.
a. fixed constant
b. random constant
c. dynamic value
d. key-relative value
____ are used to model electrical circuits, chemical compounds, highway maps, and so
on.
a. Trees
b. Pictures
page-pfe
c. Graphs
d. Models
Every element in an STL list points to its immediate predecessor and to its immediate
successor.
When converting the subtree into a heap, if the root node of the subtree is larger than
the larger child, we swap the root node with the larger child.
In the STL container list, the function push_front adds an element at the beginning of
the list.
page-pff
In a linked list implementation of a stack, only a fixed number of elements can be
pushed onto the stack.
For efficiency purposes, wherever possible, you should overload operators as
nonmember functions.
The operation top removes the top element of the stack.
page-pf10
In an array, item insertion (especially if the array is sorted) and item deletion can be
very time consuming, especially if the list size is very large.
Both random and quadratic probings eliminate primary clustering.
A queuing system only consists of queues of objects waiting to be served.
In linear probing, starting at location t, we search the array sequentially to find the next
available array slot.
page-pf11
A general solution to a recursive algorithm must eventually reduce to a base case.
Selection sort involves the following steps in the unsorted portion of the list: find the
location of the smallest element and move the smallest element to the beginning of the
unsorted list.
When * is used as a unary operator, * refers to the object to which the operand of the *
(that is, the pointer) points.
page-pf12
Building a linked list forward places the new item to be added at the beginning of the
linked list.
The algorithm min is used to determine the minimum of two values.
A graph can be represented in computer memory in only one way.
Building a linked list backwards places the new item to be added at the end of the
linked list.
page-pf13
To write programs that process and manipulate graphs, the graphs must be stored in
computer memory.
The deque class is a type of container adapter.
Certain applications might require the data in an ordered list to be printed in descending
order, which means that we must print the list backward.

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.