What is destructor give example?
Answer / Vivek Kumar Tripathi
A destructor is a special member function of a class that is called when an object goes out of scope or when the delete operator is used on a pointer to the object. It is used to clean up any resources (like memory or files) that were allocated by the object. An example in C++ would be: class MyClass {ntMyClass() {ntt// cleanup code herent}n};
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the access specifiers avaible in c++?
what is object slicing
Program to check whether a word is in all capital letters
What is a superclass in oop?
what is main difference between object oriented object base
What is the default size allocated for array in the statement if size not specified " int a[] "
How compiler selects(internally) required overridden function in inheritance?
2 Answers CSC, Infinite Computer Solutions,
What is difference between multiple inheritance and multilevel inheritance?
Is oop better than procedural?
How to call a non virtual function in the derived class by using base class pointer
How would you stop a class from class from being derived or inherited.
How many types of access specifier in c# and vb.net?