Explore topic-wise MCQs in Data Structures Mcqs.

This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures Mcqs knowledge and support exam preparation. Choose a topic below to get started.

1.

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
Answer» E.
2.

What s wrong with this code which returns xor of two nodes address ?

A. Nothing wrong. everything is fine
B. Type casting at return is missing
C. Parameters are wrong
D. Total logic is wrong
Answer» C. Parameters are wrong
3.

Which of the following statements are true ?i) practical application of XOR linked lists are in environments with limited space requirements, such as embedded devices.ii)xor lists are not suitable because most garbage collectors will fail to work properly with classes or structures that don t contain literal pointersiii)in order to calculate the address of the next node you need to remember the address of the previous nodeiv)xor lists are much efficient than single, doubly linked lists and arrays

A. I, ii, iii, iv
B. I, ii, iii
C. I, ii
D. I
Answer» C. I, ii
4.

While creating a linked list or inserting an element into a linked list, whenever a request for the new node arrives, the memory manager searches through the for the block of desired size.

A. Free pool
B. Memory bank
C. Free storage list
D. None of the above
Answer» D. None of the above
5.

is very useful in situation when data have to stored and then retrieved in reverse order.

A. Stack
B. Queue
C. List
D. Link list
Answer» B. Queue
6.

Direct or random access of elements is not possible in

A. Linked list
B. Array
C. String
D. None of these
Answer» B. Array
7.

If start is pointing to first node of the linked list then consider the following statement -start = start->next;current = start->next;what will be the value of address field of current ?

A. 5571
B. 5572
C. 3225
D. 2184
Answer» B. 5572
8.

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
Answer» B. Link field and avail field
9.

There is an extra element at the head of the list called a .

A. Antinel
B. Sentinel
C. List header
D. List head
Answer» C. List header
10.

struct node *current = start->nextwhat current will contain if it is variable of type struct node ?

A. Address of 2nd Node
B. Address Field of 2nd Node
C. Data Field of 2nd Node
D. None of these
Answer» B. Address Field of 2nd Node
11.

The advantage of .. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists.

A. Lists
B. Linked Lists
C. Trees
D. Queues
Answer» C. Trees
12.

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» B. Last node points to first node.
13.

The following function reverse() is supposed to reverse a singly linked list. There is one line missing at the end of the function.What should be added in place of /*ADD A STATEMENT HERE*/ , so that the function correctly reverses a linked list.

A. *head_ref = prev,
B. *head_ref = current,
C. *head_ref = next,
D. *head_ref = NULL,
Answer» B. *head_ref = current,
14.

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» B. Traverse the nodes when free space pool is empty
15.

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 listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) 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
Answer» C. I, II and III