Question Detail

How to define a destructor

  • X~() {}
  • X() {}~
  • X() ~{}
  • ~X() {}
Similar Questions :

1. Which class has only one unique value for all the objects of class

  • this
  • friend
  • static
  • none of above

2. what is a class in c++

  • Class in a collection of objects
  • Class has noting to do with object
  • It just have declaration of few variables
  • None of above

3. What is abstract class

  • Whose objects cant be created
  • Whose objects can be created
  • Depends on class
  • None of above

4. Which arithmetic operation can be done in pointer

  • Multiplication
  • Division
  • Addition
  • None of above

5. expression x.y represents as

  • member x of object y
  • member y of object x
  • member y of object pointed by x
  • all of above
Read more from - C++ Programming Questions Answers - Chapter 1