Constructors And Destructors In C Plus Plus - Study Mode

[#41] When a copy constructor is called?
Correct Answer

(D) All of the mentioned

[#42] How many parameters does a default constructor require?
Correct Answer

(C) 0

[#43] What is the role of destructors in Classes?
Correct Answer

(B) To destroy an object when the lifetime of an object ends

[#44] What happens if a user forgets to define a constructor inside a class?
Correct Answer

(D) Compiler provides a default constructor to avoid faults/errors

[#45] What is a constructor in C++?
Correct Answer

(B) A special member function that initializes objects