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

2. All members of class have which access to its members

  • private
  • public
  • protected
  • depends

3. How to define a destructor

  • X~() {}
  • X() {}~
  • X() ~{}
  • ~X() {}

4. Which of the following functions below can be used Allocate space for array in memory

  • calloc()
  • malloc()
  • realloc()
  • All of above

5. C++ programs must contain

  • start()
  • system()
  • main()
  • program()
Read more from - C++ Programming Questions Answers - Chapter 1
Post a comment