The number of key comparisons in a sequential search depends

The number of key comparisons in a sequential search depends on the value of the search item.

True

False

QUESTION 2

The structured design approach is also known as ____.

bottom-up design

top-down design

object design

QUESTION 3

The expression vecList.front() moves an element to the front of the vector.

True

False

QUESTION 4

Containers are essentially used ____.

to update objects that are part of a given set of elements

to manage objects of a given type

to manipulate data

QUESTION 5

The operation ____ reinitializes the stack to an empty state.

alloc

init

initializeStack

QUESTION 6

In a doubly linked list, some of the operations require modification from how they were implemented for a regular linked list, because of the ____ pointer(s) in each node.

null

two

three

QUESTION 7

We can traverse a singly linked list backward starting from the last node.

True

False

QUESTION 8

A precondition is a statement specifying the condition(s) that must be true before the function is called.

True

False

QUESTION 9

To remove, or pop, an element from the stack ____.

invert stackTop

decrement stackTop by 1

increment stackTop by 1

QUESTION 10

To define new classes, you create new ____ files.

header

friend

placeholder

QUESTION 11

A technique in which one system models the behavior of another system is called ____.

bench testing

simulation

referencing

QUESTION 12

With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit.

class unit

class tuple

class double

class pair

QUESTION 13

A ____ is a list in which each element contains a key, such that the key in the element at position k in the list is at least as large as the key in the element at position 2k + 1 (if it exists) and 2k + 2 (if it exists).

heap

hemp

hash table

QUESTION 14

Default arguments can be used with an overloaded operator.

True

False

QUESTION 15

The syntax for accessing a class (struct) member using the operator -> is ____.

pointerVariableName.classMemberName

pointerVariableName&->classMemberName

pointerVariableName->classMemberName

QUESTION 16

The components of a class are called the ____ of the class.

objects

members

operators

QUESTION 17

Operations, such as finding the height, determining the number of nodes, checking whether the tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they are implemented on binary trees.

True

False

QUESTION 18

The analysis of algorithms enables programmers to decide which algorithm to use for a specific application.

True

False

QUESTION 19

A linked list is a collection of ____.

addresses

classes

nodes

QUESTION 20

In a ____, customers or jobs with higher priority are pushed to the front of the queue.

false queue

priority queue

free queue

double queue

QUESTION 21

When the destructor ____ the queue, it deallocates the memory occupied by the elements of the queue.

instantiates

allocates

destroys

QUESTION 22

In breadth first traversal, starting at the first vertex, the graph is traversed as little as possible.

True

False

QUESTION 23

The header node is placed at the ____ of a list.

middle

end

beginning

QUESTION 24

The use of a queue structure ensures that the items are processed in the order they are received.

True

False

QUESTION 25

When you declare a derived class object, this object inherits the members of the base class, but the derived class object cannot directly access the ____.

base class constructors

data members in its own class

private data members of the base class

QUESTION 26

Because a queue is an important data structure, the Standard Template Library (STL) provides a class to implement queues in a program.

True

False

QUESTION 27

If the list is stored in an array, we can traverse the list in either direction using an ____.

increment variable

index variable

interface variable

QUESTION 28

The statement vecList.push_back(elem) deletes the element elem from the vector.

True

False

QUESTION 29

____ iterators are forward iterators that can also iterate backward over the elements.

Output

Input

Bidirectional

QUESTION 30

The copy constructor automatically executes when, as a parameter, an object is passed by value.

True

False

QUESTION 31

A list is ordered if its elements are ordered according to some criteria.

True

False

QUESTION 32

The derived class can redefine public member functions of a base class.

True

False

QUESTION 33

The expression vecCont.empty() empties the vector container of all elements.

True

false

  

QUESTION 34

The deque class is a type of container adapter.

True

False

QUESTION 35

The binary search algorithm uses the ____ technique to search the list.

conquer-and-resign

divide-and-divide

divide-and-conquer

QUESTION 36

In a shallow copy, two pointers of different data types point to the same memory.

True

False

QUESTION 37

Every call to a recursive function requires the system to allocate memory for the local variables and formal parameters

True

False

QUESTION 38

If the list is stored in a linked list, we can traverse the list in only one direction starting at the first node because the links are only in one direction.

True

False

QUESTION 39

In the random probing method, the ith slot in the probe sequence is ____.

(h(X) + ri) % HTSize

(h(X) + HTSize) % ri

(h(X) % HTSize) + ri

(h(X) % ri) + HTSize

QUESTION 40

Containers are class templates.

True

False

A.

bottom-up design

B.

top-down design

C.

object design

Solution

QUESTION 1

The number of key comparisons in a sequential search depends on the value of the search item.

True

False

ANSWER: FALSE

QUESTION 2

The structured design approach is also known as ____.

bottom-up design

top-down design

object design

ANSWER: TOP- DOWN DESIGN

QUESTION 3

The expression vecList.front() moves an element to the front of the vector.

True

False

ANSWER: FALSE

QUESTION 4

Containers are essentially used ____.

to update objects that are part of a given set of elements

to manage objects of a given type

to manipulate data

ANSWER: To manage objects of a given type

QUESTION 5

The operation ____ reinitializes the stack to an empty state.

alloc

init

initializeStack

ANSWER initializeStack

QUESTION 6

In a doubly linked list, some of the operations require modification from how they were implemented for a regular linked list, because of the ____ pointer(s) in each node.

null

two

three

ANSWER :THREE

QUESTION 7

We can traverse a singly linked list backward starting from the last node.

True

False

ANSWER: FALSE

QUESTION 8

A precondition is a statement specifying the condition(s) that must be true before the function is called.

True

False

ANSWER: TRUE

QUESTION 9

To remove, or pop, an element from the stack ____.

invert stackTop

decrement stackTop by 1

increment stackTop by 1

ANSWER decrement stackTop by 1

QUESTION 10

To define new classes, you create new ____ files.

header

friend

placeholder

ANSWER header

QUESTION 11

A technique in which one system models the behavior of another system is called ____.

bench testing

simulation

referencing

ANSWER stimulation

QUESTION 12

With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit.

class unit

class tuple

class double

class pair

ANSWER class pair

QUESTION 13

A ____ is a list in which each element contains a key, such that the key in the element at position k in the list is at least as large as the key in the element at position 2k + 1 (if it exists) and 2k + 2 (if it exists).

heap

hemp

hash table

ANSWER: HEAP

QUESTION 14

Default arguments can be used with an overloaded operator.

True

False

ANSWER: false

QUESTION 15

The syntax for accessing a class (struct) member using the operator -> is ____.

pointerVariableName.classMemberName

pointerVariableName&->classMemberName

pointerVariableName->classMemberName

ANSWER: pointerVariableName->classMemberName

QUESTION 16

The components of a class are called the ____ of the class.

objects

members

operators

ANSWER: members

QUESTION 17

Operations, such as finding the height, determining the number of nodes, checking whether the tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they are implemented on binary trees.

True

False

ANSWER: false

QUESTION 18

The analysis of algorithms enables programmers to decide which algorithm to use for a specific application.

True

False

ANSWER: true

QUESTION 19

A linked list is a collection of ____.

addresses

classes

nodes

ANSWER: NODES

QUESTION 20

In a ____, customers or jobs with higher priority are pushed to the front of the queue.

false queue

priority queue

free queue

double queue

ANSWER: priority queue

QUESTION 21

When the destructor ____ the queue, it deallocates the memory occupied by the elements of the queue.

instantiates

allocates

destroys

ANSWER: destroys

QUESTION 22

In breadth first traversal, starting at the first vertex, the graph is traversed as little as possible.

True

False

ANSWER: false

QUESTION 23

The header node is placed at the ____ of a list.

middle

end

beginning

ANSWER: beginning

QUESTION 24

The use of a queue structure ensures that the items are processed in the order they are received.

True

False

ANSWER: true

QUESTION 25

When you declare a derived class object, this object inherits the members of the base class, but the derived class object cannot directly access the ____.

base class constructors

data members in its own class

private data members of the base class

ANSWER: private data members of the base class

QUESTION 26

Because a queue is an important data structure, the Standard Template Library (STL) provides a class to implement queues in a program.

True

False

ANSWER: true

QUESTION 27

If the list is stored in an array, we can traverse the list in either direction using an ____.

increment variable

index variable

interface variable

ANSWER: index variable

QUESTION 28

The statement vecList.push_back(elem) deletes the element elem from the vector.

True

False

ANSWER: false

QUESTION 29

____ iterators are forward iterators that can also iterate backward over the elements.

Output

Input

Bidirectional

ANSWER: Bidirectional

QUESTION 30

The copy constructor automatically executes when, as a parameter, an object is passed by value.

True

False

ANSWER: true

QUESTION 31

A list is ordered if its elements are ordered according to some criteria.

True

False

ANSWER: true

QUESTION 32

The derived class can redefine public member functions of a base class.

True

False

ANSWER: true

QUESTION 33

The expression vecCont.empty() empties the vector container of all elements.

True

false

ANSWER: false

  

QUESTION 34

The deque class is a type of container adapter.

True

False

ANSWER: false

QUESTION 35

The binary search algorithm uses the ____ technique to search the list.

conquer-and-resign

divide-and-divide

divide-and-conquer

ANSWER divide-and-conquer

QUESTION 36:

In a shallow copy, two pointers of different data types point to the same memory.

True

False

ANSWER: FALSE

QUESTION 37

Every call to a recursive function requires the system to allocate memory for the local variables and formal parameters

True

False

ANSWER: TRUE

QUESTION 38

If the list is stored in a linked list, we can traverse the list in only one direction starting at the first node because the links are only in one direction.

True

False

ANSWER: TRUE

QUESTION 39

In the random probing method, the ith slot in the probe sequence is ____.

(h(X) + ri) % HTSize

(h(X) + HTSize) % ri

(h(X) % HTSize) + ri

(h(X) % ri) + HTSize

ANSWER: (h(X) + ri) % HTSize

QUESTION 40

Containers are class templates.

True

False

ANSWER: TRUE

A.

bottom-up design

B.

top-down design

C.

object design

ANSWER: TOP- DOWN DESIGN

The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known
The number of key comparisons in a sequential search depends on the value of the search item. True False QUESTION 2 The structured design approach is also known

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site