Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions