Computers and Technology

Recall the definition of LinkedList from class. I've made a doubly linked list which is a child class of LinkedList. A doubly linked list has a first and last node and each node has a previous and a next pointer to other nodes. What is wrong with this function (it would be defined in DLinkedList. h but the error is in this function)? virtual void insertEnd(LLNode * toAdd)
{
LLNode * oldLast = getLastNode();

oldLast->setNext(toAdd);

p_last = toAdd;
toAdd->setPrev(oldLast);
}

Select one:
a. The previous pointer for the added node was not set.
b. oldLast may be NULL and can cause a NULL pointer exception.
c. insertEnd in LinkedList is a private function
d. If toAdd is NULL, "oldLast->setNext(toAdd);" causes a NULL pointer exception.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, neekWYB
Andrina writes letters that are regularly sent to hundreds of her company’s customers. because of this, she would like for the mail merge command to be in her quick access toolbar, and she wants it to be the first button on the left. what should andrina do to place the mail merge button there?
Answers: 1
image
Computers and Technology, 22.06.2019 15:30, mariap3504
Whats are the different parts of no verbal comunication, especially body language?
Answers: 3
image
Computers and Technology, 23.06.2019 01:30, anggar20
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
image
Computers and Technology, 23.06.2019 11:30, kyraj21
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
Do you know the correct answer?
Recall the definition of LinkedList from class. I've made a doubly linked list which is a child clas...

Questions in other subjects: