1.

Which of the following class allows to declare only one object of it?(a) Abstract class(b) Virtual class(c) Singleton class(d) Friend classI got this question during a job interview.Query is from OOPs Concept in section Basics Concepts of C++ of C++

Answer»

Right option is (C) Singleton class

Explanation: Singleton class allows the programmer to declare only ONE OBJECT of it, If one TRIES to declare more than one object the program RESULTS into error.



Discussion

No Comment Found

Related InterviewSolutions