Ask Question

Which of the following is not true of a destructor? A. It performs termination housekeeping.

B. It is called before the system reclaims the object's memory.

C. If the programmer does not explicitly provide a destructor, the compiler creates an "empty" destructor.

D. It releases the object's memory.

+2
Answers (1)
  1. 3 March, 12:19
    0
    The answer to this question is the option "D".

    Explanation:

    In this question, option d that is "It releases the object's memory" is not true. Because A destructor a special member function whose task is to destroy the object of the constructor it works when it called. Destructor is used for free the resources of the object that may have acquired during its lifetime. The destructor is as same as the class name except that in the destructor we the tilde symbol (~) and it is not called automatically.

    Syntax:

    ~ class_name ()

    {

    //body of destructor.

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of the following is not true of a destructor? A. It performs termination housekeeping. B. It is called before the system reclaims the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers