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. Which operator is used to define a member of a class from outside the class definition

  • ->
  • ::
  • .
  • >>

3. 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

4. How we define our name for constants

  • #constant
  • #define
  • #define_constant
  • #constant_define

5. Which of the following type of class allows only one object of it to be created

  • Virtual class
  • Abstract class
  • Singleton class
  • Friend class
Read more from - C++ Programming Questions Answers - Chapter 1