download Mastguru Android App

Question Detail

How to define a destructor

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

1. Constructor is

  • A class automatically called whenever a new object of this class is created
  • A class automatically called whenever a new object of this class is destroyed
  • A function automatically called whenever a new object of this class is created
  • A function automatically called whenever a new object of this class is destroyed

2. Which type of variables can be referred from anywhere in the c++ code

  • All variables
  • Local variables
  • Universal variables
  • Global variables

3. Reference is like a

  • Pointer
  • Structure
  • Array
  • None of above

4. What is polymorphism

  • Ability to take more than one form
  • Ability to destroy destructor
  • Ability to create constructor
  • None of above

5. Which operator is used to define a member of a class from outside the class definition

  • ->
  • ::
  • .
  • >>
Read more from - C++ Programming Questions Answers - Chapter 1
Post a comment