Classes And Objects In C Plus Plus - Study Mode
[#106] Which type of function is used to destroy objects in C++?
Correct Answer
(C) Destructor
[#107] What is the default access specifier for members of a class in C++?
Correct Answer
(D) private
[#108] Which operator is used to access members of an object in C++?
Correct Answer
(A) Dot operator (.)
[#109] What is the difference between a constructor and a destructor in C++?
Correct Answer
(C) Constructor is called when an object is created, while destructor is called when an object is destroyed
[#110] What is the purpose of the destructor in C++?
Correct Answer
(B) To release resources acquired by the object