wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Data Structures Quiz

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

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)

The size of array has to be pre-decided, linked lists can change their size any time.

e)

All of the above

2.

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);

}

a)

Prints all nodes of linked lists

b)

Prints all nodes of linked list in reverse order

c)

Prints alternate nodes of Linked List

d)

Prints alternate nodes in reverse order

3.

Which of the following is not a disadvantage to the usage of array?

a)

Fixed size

b)

There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size

c)

Insertion based on position

d)

Accessing elements at specified positions

4.

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

5.

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

6.

A variant of linked list in which last node of the list points to the first node of the list is?

a)

Singly linked list

b)

Doubly linked list

c)

Circular linked list

7.

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

8.

In circular linked list, insertion of node requires modification of?

a)

One pointer

b)

Two pointer

c)

Three pointer

d)

None

9.

Linked lists are not suitable to for the implementation of?

a)

Insertion sort

b)

Radix sort

c)

Polynomial manipulation

d)

Binary search

10.

Linked list is considered as an example of ___________ type of memory allocation.

a)

Dynamic

b)

Static

c)

Compile time

d)

None of the mentioned