Search Header Logo

Data Structures - LINKED LIST

Authored by Illakiya T

Computers

University

Used 19+ times

Data Structures - LINKED LIST
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Select one or more benefits of ADT

Implementation of ADTs can be changed without requiring changes to the program that uses the ADTs

Modularity

Reuse

Code is easier to understand

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In a array implementation of array, before insertion i have to move elements to one direction, then i have to free the position and then i have insert. which of the following code does that?

for(i = n-1 ; i >= pos-1 ; i--)

list[i+1] = list[i];

for(i = n-1 ; i >= pos-1 ; i--)

list[i-1] = list[i];

for(i = n-1 ; i >= pos-1 ; i--)

list[i] = list[i+1];

for(i = n-1 ; i >= pos-1 ; i--)

list[i] = list[i-1];

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Routine to delete element in an array implementation

for(i=pos-1;i<n-1;i++)

list[i]=list[i-1];

for(i=pos-1;i<n-1;i++)

list[i]=list[i*1];

for(i=pos-1;i<n-1;i++)

list[i]=list[i+1];

for(i=pos-1;i<n-1;i++)

list[i]=list[i+2];

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given below, code to display "n" elements in an array. Fill with appropriate values


for(i=___;i<____;i++)

printf("%d\t",list[i]);

0,n

n,0

0,n-1

n-1,0

5.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which of the following is/are the advantages of Linked list?

Insertion and deletion of elements can be done efficiently

It uses dynamic memory allocation

Memory utilization is efficient compared to arrays

6.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which of the following is/are not the dis-advantage of Linked list?

Linked list does not support random access

Memory is required to store next field

Searching takes time compared to arrays

None of the above

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Give syntax to create a node for Single linked list?

newnode=(struct node *)malloc(sizeof(struct node*));

newnode=(struct node )malloc(sizeof(struct node));

newnode=(struct node *)malloc(sizeof(struct node));

newnode=(struct node )malloc(sizeof(struct node*));

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?