Multiple Choice
For a non-empty linked list, select the code that should appear in a function that adds a node to the end of the list. newPtr is a pointer to the new node to be added and lastPtr is a pointer to the current last node. Each node contains a pointer nextPtr.
A) lastPtr->nextPtr = newPtr; lastPtr = newPtr
B) lastPtr = newPtr; lastPtr->nextPtr = newPtr
C) newPtr->nextPtr = lastPtr; lastPtr = newPtr
D) lastPtr = newPtr; newPtr->nextPtr = lastPtr
Correct Answer:

Verified
Correct Answer:
Verified
Q7: How many pointers are contained as data
Q8: _ is not an advantage of linked
Q9: Which of the following is not a
Q10: Which data structure represents a waiting line
Q11: A queue performs the following commands (in
Q12: What kind of linked list begins with
Q13: A linked list has the functions insertAtFront,
Q14: A stack is initially empty, then the
Q16: If you add the following nodes to
Q17: If you have a 1000-element balanced binary