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
xz_007 [3.2K]
3 years ago
5

. What is a destructor and what is its purpose?

Computers and Technology
1 answer:
NISA [10]3 years ago
5 0

Answer:

Destructor is a function or method which is used to deallocated the memory which is allocated by the constructor in the program.The destructor is used to delete the object or destruct the object.

Explanation:

The Purpose of Destructor is to delete the object from the memory which is created by Constructor.

The Destructor have same name as the class name in c++.

In c++ we use destructor like that

#include <iostream>

using namespace std;

class Hello

{

   public:

       Hello () //constructor defined

      {

     cout << "Hey constructor is called here:" << endl;

      }

      ~Hello() //destructor defined

      {

            cout << "Now destructor is called here:" << endl;

      }

};

int main()

{

    Hello h; //constructor is called

    cout << "function main is closing...." << endl;

   

    return 0;

}  

You might be interested in
When a visitor clicks the submit button on a form, the ______ of each form element is sent?
Bond [772]

In data presentation of computing systems and applications, when a user click the submit button on the form, the name-value pair of each form is sent because it is an open-ended data structure that allows future extension without altering existing code or data.

6 0
3 years ago
Read 2 more answers
Write a statement that increments numUsers if updateDirection is 1, otherwise decrements numUsers. Ex: if numUsers is 8 and upda
Lady_Fox [76]

Answer:

Following are the statement is given below

if(updateDirection ==1) // check condition

{

++numUsers; // increments the value

}

else

{

--numUsers; // decrement the value

}

Explanation:

Following are the description of statement

  • Check the condition in the if block .If the "updateDirection" variable is 1 then then control moves to the if block otherwise control moves to the else block statement.
  • In the if  block the statement is "++numUsers" it means it increment the value by 1 .
  • In the else block the statement is "--numUsers" it means it decrement  the value by 1 .

4 0
3 years ago
Which of the following can be used to locate data in a particular column?
dangina [55]

Answer:

A. VLOOKUP

Explanation:

VLOOKUP is an Excel function to look up data in a table organized vertically. VLOOKUP supports approximate and exact matching, and wildcards (* ?) for partial matches. Lookup values must appear in the first column of the table passed into VLOOKUP.

Purpose 

Lookup a value in a table by matching on the first column

Return value 

The matched value from a table.

Syntax 

=VLOOKUP (value, table, col_index, [range_lookup])

Arguments 

value - The value to look for in the first column of a table.

table - The table from which to retrieve a value.

col_index - The column in the table from which to retrieve a value.

range_lookup - [optional] TRUE = approximate match (default). FALSE = exact match.

4 0
3 years ago
“When using a public computer for browsing the Internet, try to use for 1.________ transactions. Also, use 2.__________ browsing
Tamiku [17]

option 2 is c

option 1is B

3 0
3 years ago
Read 2 more answers
Examine the efficiency the various recovery algorithms used in deadlock handling
sineoko [7]

Solution:

The process of transaction can guarantee the reliability of business applications. Locking resources is widely used in distributed transaction management (e.g; two phase commit, 2PC) to keep the system consistent. The locking mechanism, however, potentially results in various deadlocks. In service oriented architecture, the deadlock problem becomes even worse because multiple transactions try to lock shared resources in the unexpectable way due to the more randomicity of transaction requests, which has not been solved by existing research results. In this paper, we investigate how to prevent local deadlocks, caused by the resource competition among multiple sub-transactions of a gl obal transaction, and global deadlocks from the competition among different global transactions. We propose a replication based approach to avoid the local deadlocks, and a timestamp based approach to significantly mitigate the global deadlocks. A general algorithm is designed for both local and global deadlock prevention. The experimental results demonstrate the effectiveness and efficiency of our deadlock prevention approach. Further, it is also proved that our approach provides higher system performance than traditional resource allocation schemes.

This is the required answer.

4 0
3 years ago
Other questions:
  • Which is an example of withholding you might see on your pay stub
    14·2 answers
  • ----------HELP WITH 3 QUESTIONS FOR 30 POINTS!!!---------
    6·1 answer
  • A system that monitors network use for potential hacking attempts and takes preventative action to block, isolate, or identify a
    11·1 answer
  • Use the drop-down menus to complete each sentence about the layers of the atmosphere.
    14·2 answers
  • What is a special type of variable used in subroutines that refers to a piece of data?
    15·1 answer
  • What is the value of numX when this program is executed? if 3 &lt; 5 and 8 != 3: numX = 3 else: numX = 7
    13·2 answers
  • What is the volume of a rectangular prism with a length of 812 centimeters, width of 913 centimeters, and a height of 1225 centi
    12·1 answer
  • Name any three areas of of application of excel.
    12·1 answer
  • For angular how can we set up th edatabse.
    11·1 answer
  • Assume the user types in 7 for x and 2 for y. What is output by the
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!