Constructors and Destructors on C++ related Questions and Answers

Question 1 : Can a class have virtual destructor?
1. Yes
2. No

View Answer   Discuss with Members

Question 4 : Which of the following gets called when an object is being created?
1. constructor
2. Virtual Function
3. Destructor
4. Main
View Answer   Discuss with Members

Question 5 : How many times a constructor is called in the life-time of an object?
1. Only once
2. Twice
3. Thrice
4. Depends on the way of creation of object
View Answer   Discuss with Members

Question 6 : Which of the following never requires any arguments?
1. Member function
2. Friend function
3. Default constructor
4. const function
View Answer   Discuss with Members

Question 8 : How many default constructors per class are possible?
1. Only one
2. Two
3. Three
4. Unlimited
View Answer   Discuss with Members

Question 9 : Which of the following are NOT provided by the compiler by default?
1. Zero-argument Constructor
2. Destructor
3. Copy Constructor
4. Copy Destructor
View Answer   Discuss with Members

Question 10 : Which of the following cannot be declared as virtual?
1. constructor
2. Destructor
3. Data Members
4. Both A and B
View Answer   Discuss with Members


View 1 - 10 of 17 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter