Ask Question
16 July, 03:00

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.

+1
Answers (1)
  1. 16 July, 04:17
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers