subject

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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
The "instance" relationship shows that something is an object of a
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
question
Computers and Technology, 23.06.2019 22:50
An environmental protection agency study of 12 automobiles revealed a correlation of 0.47 between engine size and emissions. at 0.01 significance level, can we conclude that there is a positive association between the variables? what is the p value? interpret.
Answers: 2
question
Computers and Technology, 24.06.2019 07:00
Guys do you know sh27 cause he hacked me : ( pidgegunderson my old user
Answers: 2
You know the right answer?
Recall the definition of LinkedList from class. I've made a doubly linked list which is a child clas...
Questions
question
History, 19.10.2020 23:01
question
World Languages, 19.10.2020 23:01
question
Spanish, 19.10.2020 23:01
Questions on the website: 13722367