What is virtual destructors? Why they are used?
Virtual destructors in C++ are used to avoid memory leaks especially when your class contains unmanaged code, i.e., contains pointers or object handles to files, databases or other external objects. A destructor can be virtual. ... Now, suppose you create an instance of the Derived class using a Base class pointer.
| Is This Answer Correct ? | 0 Yes | 0 No |
Should you pass exceptions by value or by reference?
What is a dangling pointer?
Explain the virtual inheritance in c++.
What is a c++ vector?
Who invented turbo c++?
In the derived class, which data member of the base class are visible?
What is tellg () in c++?
What is switch case in c++ syntax?
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?
When there is a global variable and local variable with the same name, how will you access the global variable?
what is an array
Name the debugging methods that are used to solve problems?