1.

What is an abstract class in C++?(a) Class specifically used as a base class with atleast one virtual functions(b) Class specifically used as a base class with atleast one pure virtual functions(c) Class from which any class is derived(d) Any Class in C++ is an abstract classThe question was asked in an interview for internship.I'm obligated to ask this question of Abstract Classes topic in portion Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

Right answer is (B) Class specifically used as a base class with atleast one PURE VIRTUAL functions

Easy explanation - An abstract class is defined as a class which is specifically used as a base class. An abstract class should have atleast one pure virtual FUNCTION.



Discussion

No Comment Found

Related InterviewSolutions