Enter your search terms
Submit search form
Web
examineonline.googlepages.com
Online Exam
>>
DataBase
>>
Data Structures
>>
Test 1
Menu
Programming
COMPTIA
GMAT
English
IQ
DataBase
OS
MCSE
CISCO
Finance
Management
Health
Soft Skills
Web Building
Multimedia
Test 1
1 . The destructor is responsible for allocating all the memory that was allocated for the linked list.
A.
True
B.
False
2 . Definitions of member functions for the LinkedList class are contained in
A.
LinkedList.h file
B.
LinkedList.cpp file
C.
LinkedList.txt file
D.
LinkedListDemo.cpp file
3 . How can a node be inserted in the middle of a linked list?
A.
by repointing the previous and the next elements of existing nodes to the new node
B.
by repointing only the next elements of existing node to the new node
C.
by repointing only the Previous elements of existing node to the new node
D.
None of the above
4 . A doubly linked list is a linked list consisting of nodes that have both the previous and next elements
A.
True
B.
False
5 . The node in a single linked list can reference the previous node in the linked list.
A.
True
B.
False
6 . Astack is a data structure that organizes data similar to how you organize dishes in a stack on your kitchen counter.
A.
True
B.
False
7 . A stack-linked list is a data structure that uses a ______ to create a stack
A.
Linked List
B.
Queue
C.
Doubly linked list
8 . The front of the stack in a stack-linked list ______________
A.
Back of the linked list
B.
Front of the linked list
C.
Middle of the Linked list
D.
None of the above
9 . ________ is the maximum number of nodes that you can have on a stack-linked list ?
A.
Zero
B.
Same as linked list
C.
Any Numbers
10 . The benefit of using a stack-linked list is that the number of nodes on the stack can increase or decrease as needed while the program runs.
A.
True
B.
False
11 . Why does the StackLinkedList class inherit the LinkedList class?
A.
StackLinkedList class uses different attributes and member functions of the LinkedList class.
B.
StackLinkedList class uses same attributes and member functions of the LinkedList class.
12 . What happens when you push a new node onto a stack?
A.
the new node is placed at the front of the linked list.
B.
the new node is placed at the back of the linked list.
C.
the new node is placed at the middle of the linked list.
D.
No Changes happens
13 . LinkedList.h file is the header file that contains the definition of the Node structure and the definition of the LinkedList class
A.
True
B.
False
14 . The isEmpty () member function must determine if the stack is empty
A.
True
B.
False
15 . The pop() member function determines if the stack is empty by calling the _____ member function
A.
removeback()
B.
isEmpty()
C.
removedfront()
16 . StackLinkedList class inherits the LinkedList class
A.
True
B.
False
17 . In addition to the attributes and behaviors defined in the LinkedList class, the StackLinkedList class requires five behaviors defined as member functions: a constructor and destructor, push(), pop(), and isEmpty().
A.
True
B.
False
18 . Conceptually, a linked list queue is the same as a queue built using an array
A.
True
B.
False
19 . In an array queue, data is stored in an _____ element.
A.
Node
B.
linked list
C.
array
D.
constructor
20 . A _______ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.
A.
queue linked list
B.
stacks linked list
C.
both of them
D.
neither of them
21 . The size of a queue linked list can change during runtime
A.
True
B.
False
22 . The size of an array queue can change during runtime
A.
True
B.
False
23 . New nodes are added to the _____ of the queue.
A.
front
B.
back
C.
middle
24 . Node on a queue linked list have more than one data element
A.
True
B.
False
25 . Why is the constructor of the QueueLinkedList class empty?
A.
because initialization of data members of the LinkedList class is performed by the constructor of the LinkedList class.
B.
because initialization of data members of the LinkedList class is performed by the destructor of the LinkedList class.
C.
because initialization of data members of the QueueLinkedList class is performed by the constructor of the LinkedList class.
D.
because initialization of data members of the QueueLinkedList class is performed by the destructor of the LinkedList class
26 . QueueLinkedList class inherit the LinkedList class
A.
True
B.
False
27 . A linked list index is ____ that represents the position of a node in a linked list.
A.
An Integer
B.
a variable
C.
a character
D.
a boolean
28 . Value of the first linked list index is _______
A.
One
B.
Zero
C.
-1
D.
None of the above
29 . The removeNode() requires a reference to the node that is to be removed
A.
True
B.
False
30 . deleteNode() function requires the _____ of the data element of the node that is being removed.
A.
reference
B.
value
C.
declaration
D.
variable
31 . The appendNode() function appends the new node to the list along with the programmer specifing where to place the new node in the linked list.
A.
True
B.
False
32 . Can a linked list store data other than integers?
A.
True
B.
False
33 . The insertNodeAt() function can place a node at the front or back of a linked list if you pass the appropriate index to this function.
A.
True
B.
False
34 . The _______ function retrieves the value of the size member of the LinkedList class
A.
getSize()
B.
giveSize()
C.
seeSize()
D.
addSize()
35 . The insertNodeAt() function places a new node at a specific location in the linked list
A.
True
B.
False
36 . 119 Let's say that you need to access a particular node on a linked list, but you don't know the reference to the node or the position the node has on the linked list, although you do know the data is stored in the node. You can locate the node by calling the _____ function
A.
insertNode()
B.
giveNode()
C.
findNode()
D.
cannot locate the node at all
37 . The removeNodeAt() function removes a node by using the node's index
A.
True
B.
False
38 . A parent node is a node that branches into one or two other nodes, which are called child nodes.
A.
True
B.
False
39 . A ______ is a component of a node that identifies the node
A.
Value
B.
Tree
C.
Key
D.
Index
40 . A value is also a component of a node that is used to store data
A.
True
B.
False
41 . Parent Node is also called as _____ Node
A.
Main
B.
Root
C.
Branch
D.
Stem
42 . A leaf node does not have any child nodes
A.
True
B.
False
43 . The depth of a tree is the _______ of a tree
A.
number of nodes on the tree
B.
number of levels of a tree
C.
Number of branches
44 . The size of a tree is the number of nodes on the tree.
A.
True
B.
False
45 . A tree can have a duplicate key
A.
True
B.
False
46 . A hashtable is a table in which each entry consists of a hashed key and a value;.
A.
True
B.
False
47 . Hashing results in a hash number that has great significance
A.
True
B.
False
48 . A key entered by an application be directly compared to a key in a hashtable
A.
True
B.
False
49 . Data members of the Hashtable class stored in the private access specifier
A.
private access specifier
B.
Public access specifier
C.
common access specifier
50 . Hashing is performed at Bit level
A.
True
B.
False
Test Name :
Test 1
Category :
Data Structures
Number of Question :
50
Pass Score :
80
Test Result
Your Score :
Passing Score :
80
Result :
Copyright by
VanTuMinh
© 2007