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]
2 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]2 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
2. The<br>is the main and usually largest data storage hardware device in a computer​
Ksivusya [100]

The answer you are looking for is either Hard Drive or SSD (Solid State Disk).

4 0
2 years ago
Search engines enable you to
docker41 [41]
The answer is easily <span>locate Web pages related to a specific subject.</span>
6 0
3 years ago
Read 2 more answers
How do you think computers have helped to improve documentation, support and services within the healthcare industry.
RideAnS [48]

Computers are the excellent means for storage of patient related data.It is often necessary to maintain detailed records of the medical history of patients. Doctors often require the information about a patient's family history, physical ailments, already diagnosed diseases and prescribed medicines.
8 0
3 years ago
Read 2 more answers
What is the Most popular game out today?
belka [17]

Answer:

Roblox

Explanation:

People over a million people are playing that game FAM!!!

7 0
3 years ago
Read 2 more answers
What kind of server connects a remote system through the internet to local serial ports using tcp/ip?
zaharov [31]
A proxy server. A system requests information from the internet, and that traffic is routed through the proxy server before arriving to the requesting system.

This is why proxy servers are used for hiding identity and being more secure, as internet traffic would show the IP address of the proxy server, and not the requesting system, though this often depends on the type of proxy server, as some proxy server's main objective isn't anonymousity, but rather efficiency.
4 0
2 years ago
Other questions:
  • W jakim celu powstawały pieśni żołnierskie i partyzanckie?
    10·1 answer
  • What is the function of series-parallel circuit
    9·1 answer
  • A person planning to file for bankruptcy must receive credit counseling within two years before filing the petition.
    7·1 answer
  • What cell phone technology is the most popular in the united states?
    8·2 answers
  • Write a function called median, that takes as parameter a full, sorted array of doubles and returns the median of the list. For
    15·1 answer
  • Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for
    8·1 answer
  • A provides legal protection for something an individual has created
    12·1 answer
  • Please as soon as possible
    13·1 answer
  • The principle of ________ strongly suggests that programs should execute with the least amount of privileges needed to complete
    13·1 answer
  • Ethics related to all <br> artificial intelligence?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!