December2015 cs Q36

0. Which of the following is/are correct with reference to Abstract class and interface?
(a)A class can inherit only one Abstract class but may inherit several interfaces.
(b)An Abstract class can provide complete and default code but an interface has no code.
Codes:

  • Option : C
  • Explanation :
    A class can inherit only one Abstract class but may inherit several interfaces. An Abstract class can provide complete and default code but an interface has no code. For more information on Abstract class Refer:Pure Virtual Functions and Abstract Classes in C++ Option (C) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *