C++ Programming - Constructors and Destructors

Exercise : Constructors and Destructors - General Questions
6.
Which constructor function is designed to copy objects of the same class type?
Create constructor
Object constructor
Dynamic constructor
Copy constructor
Answer: Option
Explanation:
No answer description is available. Let's discuss.

7.
Which of the following statement is correct?
Constructor has the same name as that of the class.
Destructor has the same name as that of the class with a tilde symbol at the beginning.
Both A and B.
Destructor has the same name as the first member function of the class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

8.
Which of the following statement is incorrect?
Constructor is a member function of the class.
The compiler always provides a zero argument constructor.
It is necessary that a constructor in a class should always be public.
Both B and C.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

9.
When are the Global objects destroyed?
When the control comes out of the block in which they are being used.
When the program terminates.
When the control comes out of the function in which they are being used.
As soon as local objects die.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

10.
Copy constructor must receive its arguments by __________ .
either pass-by-value or pass-by-reference
only pass-by-value
only pass-by-reference
only pass by address
Answer: Option
Explanation:
No answer description is available. Let's discuss.