Question Detail

How to define a destructor

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

1. What is the value of sizeof(char)

  • 1
  • 2
  • 4
  • 8

2. Default constructor has how many arguments

  • 1
  • 2
  • 3
  • 0

3. If value has not type, then the pointer pointing to this value will be known as

  • Empty pointer
  • Null pointer
  • Void pointer
  • None of above

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

  • Virtual class
  • Abstract class
  • Singleton class
  • Friend class

5. How we mark the end of c++ statement

  • ;
  • :
  • >>
  • <<
Read more from - C++ Programming Questions Answers - Chapter 1