Constructors And Destructors In C Plus Plus - Study Mode
[#46] Which access specifier allows constructors to be called from anywhere in the program in C++?
Correct Answer
(C) public
[#47] What happens if a class does not explicitly declare any constructors in C++?
Correct Answer
(D) A default constructor is provided by the compiler
[#48] What is the purpose of a destructor in C++?
Correct Answer
(A) A special member function that destroys objects
[#49] What is the purpose of the 'explicit' keyword before a constructor in C++?
Correct Answer
(D) To prevent implicit conversions during object initialization
[#50] Which keyword is used to prevent inheritance in C++?
Correct Answer
(C) final