Professional Documents
Culture Documents
Semester - I (Ay 2020 - 21) Online Test Mcqs
Semester - I (Ay 2020 - 21) Online Test Mcqs
Unit-IV
Q.1 Linked lists, at any point in the list in constant time, does not allow __________. (1M)
A) Random access.
B) Insertion
C) Deletion
D) Insertion at end
Q.2. Consider a linked list of n element which is pointed by an external pointer. What is the time
taken to delete the element which is successor of the element pointed to by a given pointer? (2M)
A)O(1)
B)O(log2 n)
C)O(n)
D)O(n log2 n)
Q.3. Consider a linked list of n elements. What is the time taken to insert an element after an
element pointed by some pointer ? (2M)
A) O(1)
B) O(log2n)
C) O(n)
D) O(n log2 n)
Q.4. A linear collection of data element the linear node is given by means of pointer is called (1M)
A) Linked list
B) Node list
C) Primitive list
D)None of these
Q.5 Given 2 sorted list of size 'm' and 'n' respectively. Number of comparison needed in the worst
case by the merge sort algorithm will be (2M)
A) mn
B) max(m,n)
C) min(m,n)
D) m+n-1
Q.6. Assume ILAST points to the last node in a singly linked list whose top (i.e front)is TOP1.Assume
TOP2 points to the first node in another singly linked list(which resides in the same physical arrays
DATA and LINK).which statement will append list 2 to the end of list 1(i.e make them one linked list
with list 1's elements before list 2 (2M)
A) TOP2:=ILAST;
B) ILAST:=TOP2;
C) LINK[TOP2]:=ILAST;
D) LINK[ILAST]:=TOP 2;
Q.7. Which of the following operations is performed more efficiently by doubly linked list than by
linear linked list? (1M)
A) Deleting a node whose location is given
B) Searching an unsorted list for a given item
C) Inserting anode after the node with a given location
D)Both A& C
Q.8. Consider a linked list implementation of a queue with two pointers: front and rear. The time
needed to insert element in a queue of length n is (1M)
A) O(1)
B) O(log2 n)
C) O(n)
D) None of these
Q.9. The linked list implementation of sparse matrices is superior to the generalized dope vector
method because it is (1M)
A) Conceptually easier and completely dynamic
B) Efficient if the spars matrix is a band matrix
C) Efficient in accessing an entry
D) All of these
Q.10. In a circular linked list organization, insertion of a record involves the modification of (1M)
A) No pointer
B) 4 pointers
C) 2 pointers
D) 3 pointers
Q.11. Which of the following lines of code will delete two successive nodes of a singly linked linear
list (WITH MORE THAN TWO NODES)? Assume this code is in the main program, not a
subprocedure? (2M)
A) LINK[X]:=LINK [LINK[X]];
B) X:=LINK[LINK[X+1]];
C) LINK [LINK[X]]: =X;
D)LINK[X]:=LINK [LINK [LINK[X]]];
Q.13. To insert a node in a circular list at rear position, it should be inserted at _________ of the queue
A) Front position (1M)
B) Front -1 position
C) Rear position
D) Rear +1 position
Q.14. To free which of the following list traversing through the entire list is not necessary. (1M)
A) Priority list
B) Singly linked list
C) Double linked list
D)Both B and C
Q.15. Which of the following statement(s) is/are true regarding insertion of node in a linear linked
list? (1M)
A) Setting the field of the new node means allocating memory to newly created node
B) If node precedes all others in the list, then insert it at the front and return its address
C) Creating a new node depends upon free memory space
D) All of these
Q.16. Which of the following statement(s) are true about a doubly linked list? (1M)
A) It may be either linear or circular
B) It must contain a header node
C) It will occupy same memory space as that of linear list, both having same number of nodes
D) None of these
Q.17. Identify the steps to be taken when a first node is to be deleted from linear linked list. (2M)
I. Set link to start pointer to the second node in the list
II. Free the space associated with the first node.
III.Obtain the address of the second node in the list
IV.Count the number of the nodes in the list.
A) I and II
B) I, II, and III
C) II and III
D)I, II, III, and IV
Q.18. The concatenation of two lists is to be performed in O(1) time. Which of the following (1M)
implementations of a list should be used ?
A) Singly linked list
B) Doubly linked list
C)Circular doubly linked list
D) None of these
Q.25. In Linked list implementation, a node carries information regarding _______. (1M)
A) Link
B) Data
C) Data and Link
Q.26. A linked list in which the last node of Linked list points to the first is called a _________. (1M)
A) Circular Linked List
B) Singly Linked List
C) None of these
D) Doubly Linked List
Q.28. Linked list data structure usage offers considerable saving in (1M)
A) Space utilization & computational time
B) Space utilization
C) Computational time
Q.29. Consider linked list is used to implement the Stack then which of the following node is
considered as Top of the Stack ? (1M)
A) Any Node
B) Middle Node
C) First Node
D) Last Node
Q.30. The link field in the last node of the linked list contains _________. (1M)
A) Pointer to the next element location
B) Link to the first node
C) Zero value
Q. 31. When new element is added in the middle of singly linked list then ________. (1M)
A) No need to move element
B) Only elements that appear after the new element and before need to be moved
C) Only elements that appear after the new element need to be moved
D) Only elements that appear before the new element need to be moved
Q.32. Which of the following operation is performed more efficiently in doubly linked list ? (1M)
A) None of these
B) Searching a node at given position
C) Deleting a node at given position
D) Inserting a node at given position
Q.33. If in a linked list address of first node is 1020 then what will be the address of node at 5th
position ? (1M)
A) 1028
B) 1038
C) None of these
D) 1036
Q.34. In Circular Linked List insertion of a node involves the modification of ____ links. (1M)
A) 3
B) 1
C) 2
D) 4
Q.37. The advantage of …………….. is that they solve the problem if sequential storage (1M)
representation. But disadvantage in that is they are sequential lists.
A) Lists
B) Linked Lists
C) Trees
D) Queues
Q.38. There is an extra element at the head of the list called a ………. (1M)
A) Antinel
B) Sentinel
C) List header
D) List head
Q.39. The situation in linked list START=NULL is called ? (1M)
A) Overflow
B) Underflow
C) Both of above
D) None of Above
Q.41. Linked lists are suitable for which of the following problems? (1M)
A) Insertion sort
B) Binary search
C) Radix sort
D) Polynomial manipulation
Q.42. A linear collection of data elements where the linear node is given by means of pointer is
Called (1M)
A) linked list
B) node list
C) primitive list
D) None of these
Q.43. An ADT is defined to be a mathematical model of a user-defined type along with the (1M)
collection of all ____________ operations on that model.
A) Cardinality
B) Assignment
C) Primitive
D) Structured
Q.44. The pointer, in case of a circular linked list, pointing to the whole list is usually called
the___________. (1M)
A) Double pointer
B) List pointer
C) Circular pointer
D) End pointer
Q.46. Suppose cursor points to a node in a linked list (using the node definition with member
functions called data and link). What statement changes cursor so that it points to the next node?
A) cursor++; (1M)
B) cursor = link;
C) cursor += link;
D) cursor = cursor->link;
Q.47. Suppose cursor points to a node in a linked list (using the node definition with member
functions called data and link). What Boolean expression will be true when cursor points to the tail
node of the list? (2M)
A) (cursor == NULL)
B) (cursor->link == NULL)
C) (cursor->data == NULL)
D) (cursor->data == 0.0)
E) None of the above.
Q.48. Suppose that p is a pointer variable that contains the NULL pointer. What happens if your
program tries to read or write *p? (2M)
A) A syntax error always occurs at compilation time.
B) A run-time error always occurs when *p is evaluated.
C) A run-time error always occurs when the program finishes.
D) The results are unpredictable.
Q.51. What kind of list is best to answer questions such as "What is the item at position n?" (1M)
A) Lists implemented with an array.
B)Doubly-linked lists.
C) Singly-linked lists.
D) Doubly-linked or singly-linked lists are equally best
Q.52. Which of the following data structure is not linear data structure? (1M)
A) Arrays
B) Linked lists
C) Both of above
D) None of above
Q.53. Finding the location of the element with a given value is: (1M)
A) Traversal
B) Search
C) Sort
D) None of above
Q.55. A self-referential structure contains a pointer member that points to a structure of the same
structure type. For example, the following definition of structure node. (1M)
struct node {
int data;
};
A) True
B) False
Q.56. Function malloc returns a pointer of type void * to the memory it allocates. If it is unable to
allocate memory, it returns a NULL pointer. (1M)
A) True
B) False
Q.57. A linked list is a linear collection of self-referential structures, called nodes, connected by
pointer links—hence, the term "linked" list. (1M)
A) True
B) False
Q.58 In a______________, each node has two links, similarly to doubly-linked list, except that previous
link of the first node points to the last node and the next link of the last node points to the first
node. (1M)
A) Doubly-circularly-linked list
B) Doubly linked list
C) Singly-circularly-linked list
D) Two way linked list
Q63. What operation is supported in constant time by the doubly linked list, but not by the singly
linked list? (1M)
A) Advance
B) Move back
C) First
D) Retrieve
E) All of the above are always constant time
Q65.A linked list can be represented using two ways which are: (1M)
A) single and double
B) single and circular
C) static and dynamic
D) any of the above
Q70.The situation in which the user tries to delete a node from an empty linked list is called: (1M)
A) empty
B) free
C) overflow
D) underflow
Q.71. In a ______________, each node has one link, similarly to an ordinary singly-linked list, except that
the next link of the last node points back to the first node. (1M)
A) Doubly linked list
B) Singly-circularly-linked list
C) Doubly circular linked list
D) Two way linked list
Q72. The situation in which memory is not available for the allocation of a new node: (1M)
A) empty
B) free
C) overflow
D) underflow
Q74. To traverse a___________, you begin at any node and follow the list in either direction until you
return to the original node. (1M)
A) Doubly linked list
B) Two way linked list
C) Circular linked list
D) Singly linked list
Q79 Insertion of a node into a doubly linked list requires how many changes to various Next and
Prev pointers? (1M)
A) No changes
B) 1 Next, 1 Prev
C) 2 Next, 2 Prev
D) 3 Next, 3 Prev
E) None of the above
Q.84.Given a arbitrary pointer to an element in a singly linked list, the time complexity for its
deletion ___________. (2M)
A) O(n/2)
B) O(n*n)
C) O(n)
D) O(n*n/2)
Q.85.In C language to implement the heterogeneous linked list__________ pointer is used. (1M)
A) Void
B) Null
C) Int
D) Structure
Q.89.If you are using C language to implement a heterogeneous linked list, the pointer type u will
prefer is ________ (1M)
A) int*
B)Null
C) void*
D) float*
Q.93. Which of the following operations is not efficiently supported by a singly-linked list? (1M)
A) accessing the element in the current position
B) insertion after the current position
C) insertion before the current position
D)moving to the position immediately following the current position
Q.94. What is an ordered list (1M)
A) where the address is ordered
B) where the smaller items precede the larger ones
C) both a and b
D) none
Q.97. How many nodes are accessed, on the average, in inserting a new element into an ordered list
with n nodes (1M)
A) (n+1)/2
B) n/2
C) 1/(n+1)
D) None
Q.98. The advantage of lists over an array for implementing a priority queue is (1M)
A) Extra space should be left empty in the end to achieve this
B) Lists will take less time compared to arrays
C) No shifting of elements or gaps are necessary in a list
D) Lists don’t have direct access
Q.99. An extra node at the front of the list, which does not represent an item in the list is Called
(1M)
A) header node
B) List node
C) List header
D) Both a and c
Q.100. A __________is a self-referential data type because it contains a pointer or link to another data
of the same type. (1M)
A) Stack
B) Linked list
C) Queue
D) Priority queue