C++ Programming - Constructors and Destructors

Exercise : Constructors and Destructors - General Questions
36.
Which of the following gets called when an object is being created?
constructor
virtual function
destructor
main
Answer: Option
Explanation:
No answer description is available. Let's discuss.

37.
To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ .
destructor
delete
delete[]
kill[]
free[]
Answer: Option
Explanation:
No answer description is available. Let's discuss.

38.
Which of the following statement is correct about constructors?
A constructor has a return type.
A constructor cannot contain a function call.
A constructor has no return type.
A constructor has a void return type.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

39.
Which of the following statement is correct whenever an object goes out of scope?
The default constructor of the object is called.
The parameterized destructor is called.
The default destructor of the object is called.
None of the above.
Answer: Option
Explanation:
No answer description is available. Let's discuss.