Search Header Logo

C++ linked lists

Authored by Albert Gorup

Computers

University

Used 25+ times

C++ linked lists
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a linked list, each node contains a pointer to:

The previous node

The next node

Both the previous and next nodes

None of the other answers

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an advantage of using a linked list over an array?

Constant-time access to elements

Easy to resize

Cache-friendly

All of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add a new node to the end of a linked list?

Set the next pointer of the last node to the new node

Set the next pointer of the new node to the last node

Set the previous pointer of the last node to the new node

Set the previous pointer of the new node to the last node

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a disadvantage of using a linked list?

Requires more memory than an array

Accessing elements is slower than an array

Cannot be sorted

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a characteristic of a doubly linked list?

Each node has two pointers: one to the previous node and one to the next node

Each node has one pointer to the next node

Each node has one pointer to the next node

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a characteristic of a circular linked list?

The last node points to NULL

The first node points to NULL

The last node points to the first node

The first node points to the last node

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you delete a node from a linked list?

Set the next pointer of the previous node to the next node

Set the previous pointer of the next node to the previous node

Set the next pointer of the current node to the previous node

Set the previous pointer of the current node to the next 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?