InterviewSolution
Saved Bookmarks
| 1. |
What happens if a class does not have a name?(a) It will not have a constructor(b) It will not have a destructor(c) It is not allowed(d) It will neither have a constructor or destructorThis question was posed to me in an internship interview.My enquiry is from OOPs Concept in section Basics Concepts of C++ of C++ |
|
Answer» RIGHT choice is (b) It will not have a DESTRUCTOR Explanation: A CLASS without a name will not have a destructor. The OBJECT is made so constructor is REQUIRED but the destructor is not. Check the code below: |
|