MPCS 69240

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

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
____ iterators, with write access, step forward element-by-element.
a. Output
b. Input
c. Random access
d. Step
A(n) ____ is a collection of a fixed number of components.
a. object
b. member
c. class
d. friend
The ability to combine data and operations is called ____.
a. inheritance
b. encapsulation
c. redefinition
page-pf2
d. composition
If the data needs to be processed in a First In First Out (FIFO) manner, we typically use
a(n) ____.
a. stack
b. queue
c. map
d. hash table
In a(n) ____ copy, two or more pointers have their own data.
a. indirect
b. direct
c. deep
d. shallow
page-pf3
To divide the list into two sublists, we need to find the ____ node of the list.
a. first
b. middle
c. last
d. largest
The new class that we create from the existing classes is called the ____.
a. base class
b. modifier class
c. derived class
d. extended class
page-pf4
In hashing, the data is organized with the help of a table, called the ____.
a. key table
b. index table
c. hash table
d. relative table
The sequential search is also called a ____ search.
a. non-linear
b. quadratic
c. linear
d. binomial
The algorithm ____ is used to find the elements in one range of elements that do not
appear in another range of elements.
a. set_union
b. set_difference
page-pf5
c. set_join
d. set_innerjoin
The statement ____ declares board to be a pointer to a pointer.
a. int **board;
b. int *&board;
c. *int *board;
d. **int board;
If the postfix expression contains no errors, the function ____ prints the result.
a. printResult
b. evaluateExpression
c. clearExp
d. evaluateOpr
page-pf6
The shortest path is the path with the smallest ____.
a. weight
b. height
c. span
d. cycle
The members of a class are classified into three categories called ____ access
specifiers.
a. member
b. object
c. function
d. object
page-pf7
The first step in the heapsort of this chapter is to convert the list into a heap, called
____.
a. newHeap
b. buildHeap
c. convertHeap
d. addHeap
A vector is a type of ____.
a. associative container
b. sequence container
c. container adapter
d. iterator
When drawing a graph, the vertices are drawn as ____.
a. circles
b. squares
page-pf8
c. triangles
d. lines
In C++ terminology, a class variable is called a ____.
a. class object
b. class placeholder
c. class member
d. class template
Random access iterators are ____ iterators that can randomly process elements of a
container.
a. input
b. output
c. forward
d. bidirectional
page-pf9
A function that calls another function and eventually results in the original function call
is said to be ____ recursive.
a. directly
b. indeterminantly
c. indirectly
d. suspiciously
A ____ case is the case for which the solution is obtained directly.
a. base
b. general
c. direct
d. recursive
page-pfa
By using templates, you can write a single code segment for a set of related functions,
called a ____.
a. function template
b. function type
c. class set
d. class template
Assuming vecList is a vector container, the expression ____ deletes all elements from
the container.
a. vecList.erase(position)
b. vecList.erase(beg, end)
c. vecList.clear()
d. vecList.erase(all)
Class templates are called ____ types.
a. abstract
b. general
page-pfb
c. template
d. parameterized
The function ____ (if possible) evaluates an expression.
a. evaluateOpr
b. evaluateOperand
c. evaluateExpression
d. evaluateAll
A list is ordered if its elements are ordered according to some criteria.
page-pfc
The ____ is one in which the resulting binary search is nearly balanced.
a. ABL tree
b. AVL tree
c. BVL tree
d. BDL tree
The correct syntax for the destructor of the class tempClass is ____.
a. tempClass::~tempClass()
b. tempClass::~tempClass(x)
c. tempClass::tempClass()
d. tempClass::tempClass(x)
In a heap, the ____ is the largest element of the tree
a. root node
b. base node
c. top node
page-pfd
d. low node
Linear probing causes clustering that is called ____.
a. secondary clustering
b. linear clustering
c. primary clustering
d. primitive clustering
In a ____ traversal of a binary tree, for each node, first the left subtree is visited, then
the right subtree is visited, and then the node is visited.
a. preorder
b. inorder
c. postorder
d. recursive
page-pfe
The ____ iterator is used to input data into a program from an input stream.
a. iostream
b. ostream
c. ifstream
d. istream
The modified insertion sort introduced in 1959 by D. E. Shell is known as the
diminishing return sort.
A derived class can directly access the protected members of a base class.
page-pff
In the breadth first traversal of a graph, all the nodes at any level, i, are visited after
visiting the nodes at level i + 1.
A derived class cannot have a constructor with default parameters.
The item added to the stack last will be the item removed last.
Using static arrays, depending on the number of servers specified by the user, a list of
servers is created during program execution.
page-pf10
The statement vecList.pop_back() puts the last deleted element back on the vector.
Pointer variables must be initialized if you want them to point to something.
The algorithm reverse reverses the order of the elements in a given range.
page-pf11
A declaration such as int *p; allocates memory for p only, not for *p.
As in the case of an inorder traversal, in a postorder traversal, the first node visited is
the rightmost node of the binary tree.
A class cannot have a constructor with default parameters.
To delete a given item from an ordered linked list, there is no need to search the list to
see whether the item to be deleted is in the list.
page-pf12
Predicates are special types of function objects that return Boolean values.
In a preorder traversal of a binary tree, after visiting a node and before moving to the
right subtree, we must save a pointer to the node so that after visiting the right subtree,
we can visit the left subtree.
The queue operation isFullQueue determines whether the queue is full.
In C++, every object of a class maintains a hidden pointer to itself, and the name of this
page-pf13
pointer is "hidden".
In computer memory, the memory addresses are in binary.

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.