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
Write a program that asks the user to input four numbers (one at a time). After the four numbers have been supplied, it should t
nika2105 [10]

Answer:

<u>Output</u>

Enter first number:  

1

Enter second number:  

2

Enter third number:  

3

Enter fourth number:  

4

Average: 2.5

Explanation:

Below is the java program to calculate the average of four numbers:-

import java.util.Scanner;

public class Average {

public static void main(String[] args){

 int a,b,c,d;

 double average=0.0;

 Scanner s=new Scanner(System.in);

 System.out.println("Enter first number: ");

 a=s.nextInt();

 System.out.println("Enter second number: ");

 b=s.nextInt();

 System.out.println("Enter third number: ");

 c=s.nextInt();

 System.out.println("Enter fourth number: ");

 d=s.nextInt();

 average=(a+b+c+d)/4.0;

 System.out.println("Average: "+average);

}

}

6 0
3 years ago
Which of these is a Microsoft certification for system engineers?
Fiesta28 [93]

MCSE is a Microsoft certification for system engineers

<u>Explanation:</u>

The MCSE Certification is a certification to enhance a system engineer. They are a set of exams that examine a person’s proficiency with various Microsoft technologies similar to Windows Server, SQL Server, System Center and Office 365. MSCE has different qualities and with various specifications. One can learn all the features in our Microsoft certification guide on the official MCSE page.

Becoming approved as a Microsoft Certified Software Engineer is not inferior, so it’s deserving is often questioned. However, getting the MCSE, like any other Microsoft Certification, is deserving of the payment.

6 0
3 years ago
What is the significance of the scientific method?
Gnom [1K]
Hello there! The significance of the scientific method is that it ensures accuracy and it ensures that the experiment was done in the right order.

The scientific method is a widely accepted way of revising and rechecking the work of scientists to see if:

1. The answers match up

2. The experiment was performed correctly

3. The results are accurate

Through the scientific method, the probability is very high that things will not go wrong. The significance of this is that if the scientific method is not applied to an experiment, nobody knows the results. If nobody knows the results, there are many possible unintended consequences that could happen. Hope this helps!
6 0
1 year ago
Management of software development consist of?
JulsSmile [24]

Answer:

d. All of the above

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications.

In Computer science, management of software development consist of;

a. Process: it involves the stages through which a software application is analyzed, designed, developed, tested, etc.

b. People: it refers to the individuals involved in the software development process.

c. Project: it's the entirety of the stages a software goes through before it gets to the end user.

5 0
3 years ago
After a conditional formatting rule is created using the ____ dialog box, the rule is then available for use in the database fro
Setler [38]

Answer:

New Formatting Rule.

Explanation:

Using New Formatting Rule the rule can be used in the database .Conditional formatting is used to highlight cells with different color according to the value of the cell. Conditional formatting can be done using formulas.In conditional formatting you can use if statements ,if else staements ,formulas etc.

5 0
3 years ago
Other questions:
  • Consider the following method.
    13·1 answer
  • You install an M.2 SSD card in an M.2 slot on a motherboard. When you boot up your system, you discover the DVD drive no longer
    15·1 answer
  • Which reading strategy refers to reading only the key words and phrases?
    13·2 answers
  • What education and training is required to be an applications software engineer?
    9·1 answer
  • Ada lovelace designed the first computer
    7·1 answer
  • What is the trickiest time of the day to drive? A. Early morning B. Late night C. After the sun sets
    8·2 answers
  • How to transfer mysql database from one server to another
    6·1 answer
  • Mechanisms that can be used to rescue accident victims
    11·1 answer
  • Which statement is true about the energy of electromagnetic radiation?
    15·1 answer
  • 1. The letters that appear after the dot after a file name are called the:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!