Chennai Institute of Technology Sarathy Nagar, Pudupedu, Chennai - 600 069. Multiple Choice Questions
Chennai Institute of Technology Sarathy Nagar, Pudupedu, Chennai - 600 069. Multiple Choice Questions
Chennai Institute of Technology Sarathy Nagar, Pudupedu, Chennai - 600 069. Multiple Choice Questions
5. Which of the following is true about the characteristics of abstract data types?
i) It exports a type.
ii) It exports a set of operations
A) True, False
B) False, True
C) True, True
D) False, False
10. Each node in a linked list has two pairs of ………….. and ……………….
A) Link field and information field
B) Link field and avail field
C) Avail field and information field
D) Address field and link field
15. An ADT is defined to be a mathematical model of a user-defined type along with the collection of all
__________ operations on that model
A. Cardinality
B. Assignment
C. Structured
16. The information about an array that is used in a program will be stored in
A. symbol table
B. activation record
C. system table
D. dope vector
17. Which of the following abstract data types can be used to represent a many to many relation?
A. Tree
B. Plex
C. Graph
D. Both (b) and (c)
25. A linear collection of data elements where the linear node is given by means of pointer is called?
a) Linked list
b) Node list
c) Primitive list
d) Unordered list
26. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a
head pointer only.
Given the representation, which of the following operation can be implemented in O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the last node of the linked list
a) I and II
b) I and III
c) I, II and III
d) I, II and IV
27. In linked list each node contain minimum of two fields. One field is data field to store the data second
field is?
a) Pointer to character
b) Pointer to integer
c) Pointer to node
d) Node
29. What kind of linked list is best to answer question like “What is the item at position n?”
a) Singly linked list
b) Doubly linked list
c) Circular linked list
d) Array implementation of linked list
30. Linked lists are not suitable to for the implementation of?
a) Insertion sort
b) Radix sort
c) Polynomial manipulation
d) Binary search
34. Which of the following points is/are not true about Linked List data structure when it is compared
with array?
a) Arrays have better cache locality that can make them better in terms of performance
b) It is easy to insert and delete elements in Linked List
c) Random access is not allowed in a typical implementation of Linked Lists
d) Access of elements in linked list takes less time than compared to arrays
35. Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not
given, can we delete the node X from given linked list?
a) Possible if X is not last node
b) Possible if size of linked list is even
c) Possible if size of linked list is odd
d) Possible if X is not first node
36. You are given pointers to first and last nodes of a singly linked list, which of the following operations
are dependent on the length of the linked list?
a) Delete the first element
b) Insert a new element as a first element
c) Delete the last element of the list
d) Add a new element at the end of the list
40. How do you calculate the pointer difference in a memory efficient double linked list?
a) head xor tail
b) pointer to previous node xor pointer to next node
c) pointer to previous node – pointer to next node
d) pointer to next node – pointer to previous node
a) head-0-1-2-3-4-5-6-tail
b) head-1-2-3-4-5-6-tail
c) head-6-1-2-3-4-5-0-tail
d) head-0-1-2-3-4-5-tail
44. 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
45. Which of the following application makes use of a circular linked list?
a) Undo operation in a text editor
b) Recursive function calls
c) Allocating CPU to resources
d) Implement Hash Tables
50. 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
54. A linear collection of data elements where the linear node is given by means of pointer is called?
a) Linked list
b) Node list
c) Primitive list
d) None
55. Which of the following operations is performed more efficiently by doubly linked list than by singly
linked list?
a) Deleting a node whose location in given
b) Searching of an unsorted list for a given item
c) Inverting a node after the node with given location
d) Traversing a list to process each node
56. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a
head and tail pointer. Given the representation, which of the following operation can be implemented
in O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the last node of the linked list
a) I and II
b) I and III
c) I,II and III
d) I,II and IV
57. Consider an implementation of unsorted doubly linked list. Suppose it has its representation with a
head pointer and tail pointer. Given the representation, which of the following operation can be
implemented in O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the end node of the linked list
a) I and II
b) I and III
c) I,II and III
d) I,II,III and IV
58. Consider an implementation of unsorted doubly linked list. Suppose it has its representation with a
head pointer only. Given the representation, which of the following operation can be implemented in
O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the end node of the linked list
a) I and II
b) I and III
c) I,II and III
d) I,II,III and IV
59. Consider an implementation of unsorted circular linked list. Suppose it has its representation with a
head pointer only. Given the representation, which of the following operation can be implemented in
O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the end node of the linked list
a) I and II
b) I and III
c) I, II, III and IV
d) None
60. Consider an implementation of unsorted circular doubly linked list. Suppose it has its representation
with a head pointer only. Given the representation, which of the following operation can be
implemented in O(1) time?
i) Insertion at the front of the linked list
ii) insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the end node of the linked list
a) I and II
b) I and III
c) I, II and III
d) I,II,III and IV
61. In linked list each node contain minimum of two fields. One field is data field to store the data second
field is?
a) Pointer to character
b) Pointer to integer
c) Pointer to node
d) Node
63. What kind of linked list is best to answer question like “What is the item at position n?”
a) Singly linked list
b) Doubly linked list
c) Circular linked list
d) Array implementation of linked list
64. Which of the following statements about linked list data structure is/are TRUE?
a) Addition and deletion of an item to/ from the linked list require modification of the existing pointers
b) The linked list pointers do not provide an efficient way to search an item in the linked list
c) Linked list pointers always maintain the list in ascending order
d) The linked list data structure provides an efficient way to find kth element in the list
66. Linked lists are not suitable to for the implementation of?
a) Insertion sort
b) Radix sort
c) Polynomial manipulation
d) Binary search
67. The following C function takes a singly linked list as input argument. It modifies the list by moving
the last element to the front of the list and returns the modified list. Some part of the code left blank.
68. The following C Function takes a singly- linked list of integers as a parameter and rearranges
the elements of the lists. The function is called with the list containing the integers 1,2,3,4,5,6,7 in the
given order. What will be the contents of the list after the function completes execution?
struct node{
int value;
struct node* next;
};
void rearrange (struct node* list)
{
struct node *p,q;
int temp;
if (! List || ! list->next) return;
p->list; q=list->next;
while(q)
{
temp=p->value; p->value=q->value;
q->value=temp;p=q->next;
q=p?p->next:0;
}
}
a) 1, 2, 3, 4, 5, 6, 7
b) 2, 1, 4, 3, 6, 5, 7
c) 1, 3, 2, 5, 4, 7, 6
d) 2, 3, 4, 5, 6, 7, 1
69. What does the following function do for a given Linked List with first node as head?
void fun1(struct node* head)
{
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}
71. How many pointers are contained as data members in the nodes of a circular, doubly linked list of
integers with five nodes?
a. 5
b. 8
c. 10
d. 15
72. What is the output of following function for start pointing to first node of following linked list? 1->2-
>3->4->5->6
void fun(struct node* start)
{
if(start == NULL)
return;
printf("%d ", start->data);
if(start->next != NULL )
fun(start->next->next);
printf("%d ", start->data);
}
A. 1 4 6 6 4 1
B. 1 3 5 1 3 5
C. 1 2 3 5
D. 1 3 5 5 3 1
73. Which of these is an application of linked lists?
A. To implement file systems
B. For separate chaining in hash-tables
C. To implement non-binary trees
D. All of the mentioned
74. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a
head pointer only.
Given the representation, which of the following operation can be implemented in O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the last node of the linked list
A. I and II
B. I and III
C. I, II and III
D. I, II and IV
75. Which of the following points is/are true about Linked List data structure when it is compared with
array
A. Arrays have better cache locality that can make them better in terms of performance
B. It is easy to insert and delete elements in Linked List
C. Random access is not allowed in a typical implementation of Linked Lists
D. All of the mentioned
76. Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is
not given, can we delete the node X from given linked list?
A. Possible if X is not last node
B. Possible if size of linked list is even
C. Possible if size of linked list is odd
D. Possible if X is not first node
83. In a linked list the ………. field contains the address of next element in the list.
A. Link field
B. Next element field
C. Start field
D. Info field
84. To insert a new node in linked list free node will be available in ........
A. Available list
B. Avail list
C. Free node list
D. Memory space list
86. A ..... list is a header list where the node points back to the header node.
A. Circular header
B. Grounded header
C. Two way header
D. One way header
87. Header linked lists are frequently used for maintaining ........ in memory.
A. Polynomials
B. Binomial
C. Trinomial
D. Quadratic equation
88. The pointer that points to the first node in the list is ........
A. FIRST
B. AVAIL
C. TOP
D. REAR
91. If the availability list is null, then the condition is said to be .........
A. nil block
B. availability list underflow
C. availability list overflow
D. memory loss
92. The list which has its own pointer is called ........
A. pointer list
B. self pointer
C. free pool
D. own pointer
93. Indexing the …….. element in the list is not possible in linked lists.
A. middle
B. first
C. last
D. any where in between
94. A .......... is a header list where the last node contains the null pointer.
A. grounded header list
B. bottom header list
C. down header list
D. dropped header list
97. Which of the following conditions checks available free space in avail list?
A. Avail=Null
B. Null=Avail
C. Avail=Max stack
D. Avail=Top
100. Which of the following application makes use of a circular linked list?
A. Undo operation in a text editor
B. Recursive function calls
C. Allocating CPU to resources
D. Implement Hash Tables.