Question
C++ Help. 7)Which of the following set of statements will correctly insert newNode into a linked list after the node that p is pointing to?
C++ Help.
7)Which of the following set of statements will correctly insert newNode into a linked list after the node that p is pointing to?
a)p->link = newNode; newNode->link = p->link;
b)newNode = p; p->link = newNode;
c)newNode->link = p->link; p->link = newNode;
d)newNode = p->link; p = newNode;
8)Which of the following is a loop statement to correctly traverse a linked list, assuming that current has the same initial value as head?
a)while (current != NULL)
b)while (head != NULL)
c)while (head != current)
d)while (current != head)
10)Member variables of an abstract linked list ADT should be declared ____.
a)protected
b)static
c)private
d)public
11)The function ____ deallocates the memory occupied by each node.
a)deallocateList
b)emptyList
c)deleteList
d) destroyList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started