1.

which of the following is used to implement the c++ interfaces?(a) absolute variables(b) abstract classes(c) constant variables(d) default variablesThe question was posed to me during an online exam.This key question is from Modularization and Interfaces in chapter Functions, Namespaces & Exceptions in C++ of C++

Answer» RIGHT option is (b) abstract classes

The best I can explain: Abstract classes in C++ are purposely defined for making base classes CONTAINING ATLEAST one virtual function which can be overloaded on inheritance, which means single function name for different sub-classes, hence ACTS as an interface.


Discussion

No Comment Found

Related InterviewSolutions