download Mastguru Android App

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 of the following cannot be inherited from the base class

  • Constructor
  • Friend
  • Both A and B cannot be inherited
  • Both A and B can be inherited

2. what is the size of int datatype for 32 bit system

  • 1 byte
  • 2 byte
  • 4 byte
  • 8 byte

3. If no constructor is there, then compiler assumes the class to have a default constructor with no arguments

  • True
  • False

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

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