1.

‘Accessibility of a constructor or a destructor greatly affects the scope and visibility of their class’. Elaborate this statement

Answer»

Generally, a constructor and destructor should be defined under the public section of a class, so that its objects can be created and destroyed in any function. A private or protected constructor/destructor is not available to the nonmember functions. Thus, accessibility of a constructor or a destructor greatly affects the scope and visibility of their class.



Discussion

No Comment Found

Related InterviewSolutions