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 |
What is static function and static class?
Disadvantages of c++
Explain what is class definition in c++ ?
Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.
What are member functions used in c++?
Explain what are mutator methods in c++?
When you overload member functions, in what ways must they differ?
Is there any function that can skip certain number of characters present in the input stream?
What is an adaptor class or Wrapper class?
What is data structure in c++?
What it is and how it might be called (2 methods).
Explain the pure virtual functions?