Question Detail

How to define a destructor

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

1. Meaning of deed copy is

  • A deep copy creates a copy of the dynamically allocated objects too
  • A deep copy just copies the values of the data as they are
  • A deep copy creates a copy of the statically allocated objects too
  • Both A and C

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

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

3. Stack unwinding deals with

  • deals with polymorphism
  • deals with inheritance
  • deals with exception handing
  • deals with classes

4. Difference between static and dynamic memory allocation is

  • In static memory allocation memory to be allocated in preknown
  • In dynamic memory allocation memory to be allocated in preknown
  • There is no differnece
  • Not exact difference is mentioned

5. Which is not a correct variable type

  • float
  • int
  • double
  • real
Read more from - C++ Programming Questions Answers - Chapter 1