1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
galben [10]
3 years ago
14

Consider the following code which deletes all the nodes in a linked list. void doublyLinkedList::destroy() { nodeType *temp; //p

ointer to delete the node while (first != nullptr) { temp = first; first = first->next; ____ } last = nullptr; count = 0; } Which of the following is the missing statement?
Computers and Technology
1 answer:
Lera25 [3.4K]3 years ago
5 0

Answer:

The answer is "delete temp;".

Explanation:

  • In the given code a class "doublyLinkedList" is defined that contains a method that is destroy(). This code uses a scope resolution operator to define the method outside the class.
  • To access this method write return type of function then class name:: (use scope resolution operator) and function name.
  • In this function, nodeType temp is a pointer variable that is used to delete the node.
  • In method definition, a loop is declared that check value that is first not equal to nullptr. which means the first node is not equal to null. In this loop, a temp variable holds the first variable value and the first variable value is holding another variable value and then use the "delete temp" statement to delete a node in the list.
  • Outside a loop, the last variable holds nullptr variable value and the count variable assigns a value that is 0.
You might be interested in
What does FLUX do when soldering an electrical joint?
Strike441 [17]

Answer:

Flux is an acidic blend that makes a difference evacuate oxides from the range of the joint and so makes a difference the patch stream effectively over the joint and frame a great bond. The flux can be seen as a brown fluid as a patch is warmed, and it in some cases gives off a impactful smoke that can act as a aggravation.

3 0
3 years ago
Read 2 more answers
How long does it take to send a 3 MiB file from Host A to Host B over a circuit-switched network, assuming:
yanalaym [24]

Answer:

The answer is 69.3 ms

Explanation:

if 1 MiB = 0.008388608 Gb

then 3 MiB =  3 x 0.008388608 = 0.025165824 Gb.

since the bandwidth is equally shared amongst two users,  each user gets equal share of the bandwidth which is Total Bandwidth/Number of Users.(

The bandwidth for each user = 30.8/2 = 15.4 Gbps.

The time taken for the message to reach from host A to host B = 0.025165824/15.4 s = 0.00163414441 which is = 1.63 ms.

The link connection requires a setup time of 67.7 ms

Therefore,  the net time required is = 67.7 ms +1.63 ms = 69.3 ms.

4 0
3 years ago
Write a function endpoints that takes a list of numbers (eg. [5, 10, 15, 20, 25]) and returns a new list of only the first and l
Ne4ueva [31]

I included a picture of my code below. Best of luck with your assignment.

5 0
3 years ago
Your IT manager wants you to set up three computers to appear to users as one powerful Windows Server 2016 server. What capabili
Marina86 [1]

Answer:

The answer is "Clustering"

Explanation:

Clustering is a technique, which includes the Microsoft Windows and the coordination with an individual multi-PC's, that is mostly connected to the local area network, as a single platform.

  • It is cheaper than one device.
  • It enables you to greater machine performance and increases usability and reliability, that's why the answer to this question is "Clustering".
4 0
3 years ago
How many functions can Excel perform?
Vlad [161]

Answer:

G

Explanation:

because

3 0
4 years ago
Other questions:
  • What type of operating system runs a dedicated electronic device such as a smart thermostat?
    5·1 answer
  • You have been tasked with finding the routers that have been installed between two networks. what utility would you use to provi
    5·1 answer
  • 1. What should you do if your computer is shared by your entire family and you install a plugin that saves user names and passwo
    5·2 answers
  • Which of the following devices are least likely to deny a connection inline when an attack is detected? (select 2)
    6·1 answer
  • Write the definition of a function half which recieves a variable containing an integer as a parameter, and returns another vari
    15·1 answer
  • The Internet has made going global easier than it has ever been, but the promise of "borderless commerce" remains restrained bec
    12·1 answer
  • Which of the following was (and still is) used by computer programmers as a first test program?
    13·2 answers
  • A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code.
    7·2 answers
  • A __________ is a sequence of characters.
    10·1 answer
  • Reflection image and design
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!