wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Sasi-AN-02.05.2024

Total questions: 15

Worksheet time: 30mins

Name
Class
Date
1.
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
2.
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 of these
3.
Linked lists are not suitable to for the implementation of?
a)
Insertion sort
b)
Radix sort
c)
Polynomial manipulation
d)
Binary search
4.
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
5.
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
6.
The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?
a)
Singly linked list
b)
Doubly linked list
c)
Circular doubly linked list
d)
Array implementation of list
7.
Consider the following definition in c programming language.Which of the following c code is used to create new node? struct node { int data; struct node * next; } typedef struct node NODE; NODE *ptr;
a)
ptr = (NODE*)malloc(sizeof(NODE));
b)
ptr = (NODE*)malloc(NODE);
c)
ptr = (NODE*)malloc(sizeof(NODE*));
d)
ptr = (NODE)malloc(sizeof(NODE));
8.
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
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
11.
In Linked List implementation, a node carries information regarding
a)
Data
b)
Link
c)
Data and Link
d)
None of the mentioned
12.
Linked list data structure offers considerable saving in
a)
Computational Time
b)
Space Utilization
c)
Space Utilization and Computational Time
d)
None of the mentioned
13.
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
14.
Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?
a)
Insertion Sort
b)
Quick Sort
c)
Heap Sort
d)
Merge Sort
15.
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