76. 
A circular linked list can be used for 
A.  stack 
B.  queue 
C.  both stack & queue 
D.  neither stack or queue 
Answer» C. both stack & queue 
77. 
In doubly linked lists 
A.  a pointer is maintained to store both next and previous nodes. 
B.  two pointers are maintained to store next and previous nodes. 
C.  a pointer to self is maintained for each node. 
D.  none of the above 
Answer» B. two pointers are maintained to store next and previous nodes. 
78. 
The disadvantage in using a circular linked list is ……………………. 
A.  it is possible to get into infinite loop 
B.  last node points to first node. 
C.  time consuming 
D.  requires more memory space 
Answer» A. it is possible to get into infinite loop 
79. 
A linear list in which each node has pointers to point to the predecessor and successors nodes is called as 
A.  singly linked list 
B.  circular linked list 
C.  doubly linked list 
D.  linear linked list 
Answer» C. doubly linked list 
80. 
The situation when in a linked list START=NULL is 
A.  underflow 
B.  overflow 
C.  housefull 
D.  saturated 
Answer» A. underflow 
81. 
In doubly linked lists, traversal can be performed? 
A.  only in forward direction 
B.  only in reverse direction 
C.  in both directions 
D.  none of the above 
Answer» C. in both directions 
82. 
What differentiates a circular linked list from a normal linked list? 
A.  you cannot have the ‘next’ pointer point to null in a circular linked list 
B.  it is faster to traverse the circular linked list 
C.  you may or may not have the ‘next’ pointer point to null in a circular linked list 
D.  head node is known in circular linked list 
Answer» C. you may or may not have the ‘next’ pointer point to null in a circular linked list 
83. 
How do you count the number of elements in the circular linked list? 
A.  public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head) { temp = temp.getnext(); length++; } return length; } 
B.  public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != null) { temp = temp.getnext(); length++; } return length; } 
C.  public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head && temp != null) { temp = head.getnext(); length++; } return length; } 
D.  public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head && temp == null) { temp = head.getnext(); length++; } return length; } 
Answer» A. public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head) { temp = temp.getnext(); length++; } return length; } 
84. 
public int function()

A.  return data from the end of the list 
B.  returns the data and deletes the node at the end of the list 
C.  returns the data from the beginning of the list 
D.  returns the data and deletes the node from the beginning of the list 
Answer» D. returns the data and deletes the node from the beginning of the list 
85. 
What is the functionality of the following code? Choose the most appropriate answer. public int function()

A.  return data from the end of the list 
B.  returns the data and deletes the node at the end of the list 
C.  returns the data from the beginning of the list 
D.  returns the data and deletes the node from the beginning of the list 
Answer» B. returns the data and deletes the node at the end of the list 
86. 
How do you insert a node at the beginning of the list? 
A.  public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(node); head.setnext(node); size++; } 
B.  public class insertfront(int data) { node node = new node(data, head, head); node.getnext().setprev(node); head.setnext(node); size++; } 
C.  public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(head); head.setnext(node); size++; } 
D.  public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(node); head.setnext(node.getnext()); size++; } 
Answer» A. public class insertfront(int data) { node node = new node(data, head, head.getnext()); node.getnext().setprev(node); head.setnext(node); size++; } 
87. 
What is a dequeue? 
A.  a queue with insert/delete defined for both front and rear ends of the queue 
B.  a queue implemented with a doubly linked list 
C.  a queue implemented with both singly and doubly linked lists 
D.  a queue with insert/delete defined for front side of the queue 
Answer» A. a queue with insert/delete defined for both front and rear ends of the queue 
88. 
Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are 
A.  full: (rear+1) mod n == front, empty: rear == front 
B.  full: (rear+1) mod n == front, empty: (front+1) mod n == rear 
C.  full: rear == front, empty: (rear+1) mod n == front 
D.  full: (front+1) mod n == rear, empty: rear == front 
Answer» A. full: (rear+1) mod n == front, empty: rear == front 
89. 
Suppose implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the following statements is TRUE with respect to this modified stack? 
A.  a queue cannot be implemented using this stack. 
B.  a queue can be implemented where enqueue takes a single instruction and dequeue takes a sequence of two instructions. 
C.  a queue can be implemented where enqueue takes a sequence of three instructions and dequeue takes a single instruction. 
D.  a queue can be implemented where both enqueue and dequeue take a single instruction each. 
Answer» C. a queue can be implemented where enqueue takes a sequence of three instructions and dequeue takes a single instruction. 
90. 
Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are:

A.  leaves the queue q unchanged 
B.  reverses the order of the elements in the queue q 
C.  deletes the element at the front of the queue q and inserts it at the rear keeping the other elements in the same order 
D.  empties the queue q 
Answer» B. reverses the order of the elements in the queue q 
91. 
Consider the following statements:i. Firstinfirst out types of computations are efficiently supported by STACKS.

A.  (ii) and (iii) are true 
B.  (i) and (ii) are true 
C.  (iii) and (iv) are true 
D.  (ii) and (iv) are true 
Answer» A. (ii) and (iii) are true 
92. 
Which of the following option is not correct? 
A.  if the queue is implemented with a linked list, keeping track of a front pointer, only rear pointer s will change during an insertion into an nonempty queue. 
B.  queue data structure can be used to implement least recently used (lru) page fault algorithm and quick short algorithm. 
C.  queue data structure can be used to implement quick short algorithm but not least recently used (lru) page fault algorithm. 
D.  both (a) and (c) 
Answer» C. queue data structure can be used to implement quick short algorithm but not least recently used (lru) page fault algorithm. 
93. 
Consider a standard Circular Queue 'q' implementation (which has the same condition for Queue Full and Queue Empty) whose size is 11 and the elements of the queue are q[0], q[1], q[2].....,q[10]. The front and rear pointers are initialized to point at q[2] . In which position will the ninth element be added? 
A.  q[0] 
B.  q[1] 
C.  q[9] 
D.  q[10] 
Answer» A. q[0] 
94. 
Overflow condition in linked list may occur when attempting to ............. 
A.  create a node when free space pool is empty 
B.  traverse the nodes when free space pool is empty 
C.  create a node when linked list is empty 
D.  none of these 
Answer» A. create a node when free space pool is empty 
95. 
Which of the following is not a type of Linked List ? 
A.  doubly linked list 
B.  singly linked list 
C.  circular linked list 
D.  hybrid linked list 
Answer» D. hybrid linked list 
96. 
Linked list is generally considered as an example of _________ type of memory allocation. 
A.  static 
B.  dynamic 
C.  compile time 
D.  none of these 
Answer» B. dynamic 
97. 
Each Node contain minimum two fields one field called data field to store data. Another field is of type _________. 
A.  pointer to class 
B.  pointer to an integer 
C.  pointer to character 
D.  pointer to node 
Answer» D. pointer to node 
98. 
If in a linked list address of first node is 1020 then what will be the address of node at 5th position ? 
A.  1036 
B.  1028 
C.  1038 
D.  none of these 
Answer» D. none of these 
99. 
In Circular Linked List insertion of a node involves the modification of ____ links. 
A.  3 
B.  4 
C.  1 
D.  2 
Answer» D. 2 
100. 
If a list contains no elements it is said to be 
A.  hollow 
B.  empty 
C.  finite 
D.  infinite 
Answer» B. empty 
We want to make our service better for you. Please take a moment to fill out our survey.
Take Survey