What is the need of a destructor?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

Why are pointers used?

0 Answers  


What is a local reference?

0 Answers  


What is c++ code?

0 Answers  


Which operations are permitted on pointers?

0 Answers  


What is the use of cmath in c++?

0 Answers  






What are the c++ access specifiers?

1 Answers  


what is oops and list its features in c++?

0 Answers  


class A { public: void f(); protected: A() {} A(const A&){} }; Examine the class declaration shown above. Why are the default and copy constructors declared as protected? 1. To ensure that A cannot be created via new by a more derived class 2. To ensure that A cannot be copied 3. To ensure that A cannot be used as a base class except when public inheritance has been used 4. To ensure that A cannot be created/copied outside the inheritance chain 5. To ensure that A cannot be instantiated as a static variable

1 Answers  


#include<iostream.h> void main() { class x { public: int func(int) { cout<<"cool"; return 1; } } }

1 Answers   Infosys,


What are the basic data types used in c++?

0 Answers  


Who calls main function?

0 Answers  


What is the use of this pointer in c++?

0 Answers  


Categories