cpp-programming-constructors-and-destructors Related Question Answers

1. Which constructor function is designed to copy objects of the same class type?

2. When are the Global objects destroyed?

3. Copy constructor must receive its arguments by __________ .

4. A function with the same name as the class, but preceded with a tilde character (~) is called __________ of that class.

5. A union that has no constructor can be initialized with another union of __________ type.

6. Which of the following gets called when an object goes out of scope?

7. __________ used to make a copy of one class object from another class object of the same class type.

8. Constructors __________ to allow different approaches of object construction.

9. Which of the following cannot be declared as virtual?

10. If the copy constructor receives its arguments by value, the copy constructor would

11. Which of the following are NOT provided by the compiler by default?

12. It is a __________ error to pass arguments to a destructor.

13. If the programmer does not explicitly provide a destructor, then which of the following creates an empty destructor?

14. A __________ is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.

15. How many default constructors per class are possible?

16. Which of the following statement is correct about destructors?

17. Which of the following implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class?

18. A destructor takes __________ arguments.

19. Destructor calls are made in which order of the corresponding constructor calls?

20. Which of the following never requires any arguments?

21. A class's __________ is called when an object is destroyed.

22. Destructors __________ for automatic objects if the program terminates with a call to function exit or function abort.

23. Which of the following statements are correct?

24. How many times a constructor is called in the life-time of an object?

25. Which of the following gets called when an object is being created?

Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions