Exam 16: Linked Lists
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the string Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
The ____________________ operator advances the iterator to the next node in the linked list.
Free
(Short Answer)
4.8/5
(39)
Correct Answer:
increment
A linked list must be searched ____________________,starting from the first node.
Free
(Short Answer)
4.8/5
(39)
Correct Answer:
sequentially
Consider the following code,which deletes all the nodes in a linked list. void doublyLinkedList<Type>::destroy()
{
NodeType<Type> *temp; //pointer to delete the node
While (first != NULL)
{
Temp = first;
First = first->next;
____
}
Last = NULL;
Count = 0;
}
Which of the following is the missing statement?
Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
B
The deleteNode operation (if the item to be deleted is in a doubly linked list)requires the adjustment of ____ pointer(s)in certain nodes.
(Multiple Choice)
4.8/5
(40)
template <class Type>
____ doublyLinkedList<Type>::isEmptyList() const
{
return (first == NULL);
}
-Which of the following statements appears in the insert function of a doubly linked list?
(Multiple Choice)
4.7/5
(34)
Which of the following is a basic operation on singly linked lists?
(Multiple Choice)
4.9/5
(40)
Which of the following correctly initializes a doubly linked list in the default constructor?
(Multiple Choice)
4.8/5
(44)
template <class Type>
____ doublyLinkedList<Type>::isEmptyList() const
{
return (first == NULL);
}
-Consider the accompanying statements.The list is empty if the pointer first is ____.
(Multiple Choice)
4.8/5
(32)
The ____________________ constructor can make an identical copy of a linked list.
(Short Answer)
4.9/5
(39)
What is the output of the following program segment? (The class unorderedLinkedList is as defined in the book.) unorderedLinkedList<int> list;
List.insertFirst(6);
List.insertLast(5);
List.insertFirst(4);
List.insertFirst(8);
List.insertLast(10);
List.deleteNode(4);
List.insertFirst(1);
List.print();
(Multiple Choice)
4.9/5
(37)
In a linked list,the ____________________ operator returns the info of the current node.
(Short Answer)
4.8/5
(31)
In a linked list,the link component of each node is a(n)____________________.
(Short Answer)
4.9/5
(30)
The steps involved in inserting a new item at the beginning of an unordered linked list are ____.
(Multiple Choice)
4.8/5
(30)
You deallocate the memory for a linked list by calling the operator clear.
(True/False)
4.8/5
(38)
When you build a linked list in the backward manner,a new node is always inserted at the end of the linked list.
(True/False)
4.8/5
(39)
When building a linked list in the ____ manner,a new node is always inserted at the end of the linked list.
(Multiple Choice)
5.0/5
(37)
In a circular linked list with more than one node,it is convenient to make the pointer first point to the ____________________ node of the list.
(Short Answer)
4.7/5
(30)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)