What is an ABC: an "Abstract Base Class"?



What is an ABC: an "Abstract Base Class"?..

Answer / rohit sah

An Abstract Base Class is a class that is not intended to be instantiated itself. Rather, it is intended strictly for use as a base for other classes. To prevent instantiation, an ABC will typically contain at least one pure virtual function.

The point of an ABC is to separate the interface of a group of classes from the implementation of the functions that make up the interface. This allows other code to ignore differences in how these functions are carried out. An ABC creates a contract between its descendants and any other code that uses them. The descendants must implement a certain set of functions. Code that uses them must use those functions to access whatever it is the object involved represents.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

founder of c++

7 Answers   Microtek, TCS, TeleCommand,


What are c++ stream classes?

0 Answers  


Do class declarations end with a semicolon?

0 Answers  


Write a function to find the nth item from the end of a linked list in a single pass.

0 Answers   Huawei,


Adobe Interview & Adobe Placement Paper

1 Answers   Adobe,






How a new operator differs from the operator new?

0 Answers  


What is the full form of ios?

0 Answers  


What is a constructor and how is it called?

0 Answers  


What are the rules for naming an identifier?

0 Answers  


Does a derived class inherit or doesn't inherit?

0 Answers  


Why is c++ so fast?

0 Answers  


What is type of 'this' pointer?

0 Answers  


Categories