Exam 17: Linked Lists

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The ____ deallocates the memory occupied by the nodes of a list when the class object goes out of scope.

Free
(Multiple Choice)
4.7/5
(42)
Correct Answer:
Verified

B

Suppose that the pointer head points to the first node in the list, and the link of the last node is NULL. The first node of the linked list contains the address of the ____ node.

Free
(Multiple Choice)
5.0/5
(43)
Correct Answer:
Verified

C

The ____________________ constructor can make an identical copy of a linked list.

Free
(Short Answer)
4.8/5
(37)
Correct Answer:
Verified

copy

Which of the following is a basic operation on singly linked lists?

(Multiple Choice)
4.8/5
(41)

Memory for the components of an array does not need to be contiguous.

(True/False)
4.8/5
(47)

The ____________________ constructor executes when an object is declared and initialized using another object.

(Short Answer)
4.8/5
(32)

For classes that include pointer data members, the assignment operator must be explicitly ____________________.

(Short Answer)
4.9/5
(38)

Each node of a linked list must store the data as well as the ____________________ for the next node in the list

(Short Answer)
4.8/5
(35)

The length of a linked list is the number of nodes in the list.

(True/False)
4.7/5
(39)

It is not possible to create an ordered linked list.

(True/False)
4.9/5
(36)

A doubly linked list can be traversed in either direction.

(True/False)
4.8/5
(39)

We deallocate the memory for a linked list by calling the operator clear.

(True/False)
4.8/5
(41)

A(n) ____________________ linked list is a linked list in which every node has a next pointer and a back pointer.

(Short Answer)
4.8/5
(39)

In a linked list, the address of the first node in the list is stored in a separate location, called the ____ or first.

(Multiple Choice)
4.9/5
(43)

Linked lists allow you to overcome the size limitations of an array data type.

(True/False)
4.9/5
(36)

template <class Type> ____ doublyLinkedList<Type>::isEmptyList() const { \quad return (first == NULL); } -Consider the statements above. The list is empty if the pointer first is ____.

(Multiple Choice)
4.8/5
(35)

If a formal parameter is a value parameter, the ____________________ constructor provides the formal parameter with its own copy of the data.

(Short Answer)
4.8/5
(45)

Which of the following correctly initializes a doubly linked list in the default constructor?

(Multiple Choice)
4.8/5
(41)

In a linked list, the link component of each node is a(n) ____________________.

(Short Answer)
4.9/5
(35)

Which of the following statements appears in the insert function of a doubly linked list?

(Multiple Choice)
4.9/5
(36)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)