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?
A) delete first;
B) delete temp;
C) destroy temp;
D) clear temp;
Correct Answer:
Verified
Q9: Memory for the components of an array
Q10: You can use the pointer head of
Q15: Because each node of a linked list
Q21: Which of the following correctly initializes a
Q24: template <class Type>
_ doublyLinkedList<Type>::isEmptyList() const
{
Q25: What is the output of the following
Q26: In C++,the dereferencing operator is represented by
Q28: Each node of a linked list must
Q29: When building a linked list in the
Q32: In a linked list, the link component
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents