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. If no constructor is there, then compiler assumes the class to have a default constructor with no arguments

  • True
  • False

2. 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

3. Which is boolean operator for logical and

  • &
  • ||
  • &|
  • &&

4. expression x.y represents as

  • member x of object y
  • member y of object x
  • member y of object pointed by x
  • all of above

5. Which class has only one unique value for all the objects of class

  • this
  • friend
  • static
  • none of above
Read more from - C++ Programming Questions Answers - Chapter 1