Linked List

Linked List

University

20 Qs

quiz-placeholder

Similar activities

DSA5541 Quiz 1 TRI 2210

DSA5541 Quiz 1 TRI 2210

University

20 Qs

C Programming Unit-1 Test-2

C Programming Unit-1 Test-2

University

20 Qs

HTML Quiz

HTML Quiz

11th Grade - University

15 Qs

Đề ôn tập cuối HKI lớp 5

Đề ôn tập cuối HKI lớp 5

6th Grade - University

17 Qs

Java Quiz 1

Java Quiz 1

University

20 Qs

QUIZ 1: REVIEW ON C

QUIZ 1: REVIEW ON C

University

15 Qs

สอบปลายภาค งานกราฟิกเบื้องต้น

สอบปลายภาค งานกราฟิกเบื้องต้น

University

20 Qs

QUIZ 2

QUIZ 2

University

20 Qs

Linked List

Linked List

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Aksheya Suresh

Used 30+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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 all nodes in reverse order of linked lists

Prints alternate nodes of linked lists

Prints alternate nodes in reverse order of linked lists

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To check isEmpty condition in Circular Linked List, fill in the blanks

int isEmpty()

{

if(_________________)

return 1;

else

return 0;

}

List->Next==NULL

List->Next==List

List->Prev==NULL

List->Prev==List

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the Find() Function in SLL. Fill in the blanks

Node * Find(Node * List,int x)

{

Node * Position;

Position=List->Next;

while(_________________________)

Position=Position->Next;

return Position;

Position!=NULL && Position->Element!=x

Position->Next!=NULL && Position->Element!=x

Position!=List && Position->Element!=x

Position->Next!=List && Position->Element!=x

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the FindPrevious() Function in SLL. Fill in the blanks

Node * FindPrevious(Node * List,int x)

{

Node * Position;

Position=List->Next;

while(_________________________)

Position=Position->Next;

return Position;

Position!=NULL && Position->Next->Element!=x

Position!=NULL && Position->Element!=x

Position->Next!=NULL && Position->Next->Element!=x

Position->Next!=NULL && Position->Element!=x

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To check isLast() condition in Circular Linked List, fill in the blanks

int isLast(Node * Position, Node * List)

{

if(_________________)

return 1;

else

return 0;

}

Position->Next==NULL

List->Next==NULL

Position->Next==List

List->Next==List

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Tick the routines which is same for CLL and SLL

InsertMid

DeleteMid

DeleteBegin

InsertBegin

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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;

head=head->next->next;

printf("%d ", head->element);

}

Print all elements in order of linked list

Print all elements in reverse order of linked list

Print alternate elements in order of linked list

Print alternate elements in reverse order of linked list

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?

Discover more resources for Computers