Question Detail

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
Similar Questions :

1. Which is boolean operator for logical and

  • &
  • ||
  • &|
  • &&

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

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

3. What is inheritance

  • Inheritance allows one class to reuse the state and behavior of another class.
  • It deals with dangling pointers
  • It deals with void pointers
  • It is type of class declaration

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

  • ;
  • :
  • >>
  • <<

5. 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
Read more from - C++ Programming Questions Answers - Chapter 1