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. what is a class in c++

  • Class in a collection of objects
  • Class has noting to do with object
  • It just have declaration of few variables
  • None of above

2. Can we overload constructors in C++

  • Yes
  • No

3. Declaring pointer more than one can cause

  • Trap
  • abort a program
  • error
  • none of above

4. cout is declared in the _____ standard file within the std namespace

  • outstream
  • stdin
  • iostream
  • None of above

5. What is the value of sizeof(char)

  • 1
  • 2
  • 4
  • 8
Read more from - C++ Programming Questions Answers - Chapter 1