Search Header Logo

Linked List MCQ

Authored by Rejimoan R

Computers

University

Used 5+ times

Linked List MCQ
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

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 and II

I, II and III

I, II and IV

I and III

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

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?

Possible if X is not first node

Possible if size of linked list is even

Possible if size of linked list is odd

Possible if X is not last node

3.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

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

Heap

Static

Compile time

Dynamic

4.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Linked list data structure offers considerable saving in _____________

Computational Time

Space Utilization

Space Utilization

Speed Utilization and Computational Time

5.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

Which of the following points is/are not true about Linked List data structure when it is compared with an array?

Arrays have better cache locality that can make them better in terms of performance

It is easy to insert and delete elements in Linked List

Random access is not allowed in a typical implementation of Linked Lists

Access of elements in linked list takes less time than compared to arrays

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

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

Prints all nodes of linked lists

Prints alternate nodes in reverse order

Prints alternate nodes of Linked List

Prints all nodes of linked list in reverse order

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the following function to start pointing to the first node of the 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); }

  1. 1 4 6 6 4 1

  1. 1 3 5 1 3 5

  1. 1 2 3 5

  1. 1 3 5 5 3 1

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?