UGC-NET | UGC NET CS 2015 Dec – III | Question 36

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:

(A) (a) is true
(B) (b) is true
(C) Both (a) and (b) are true
(D) Neither (a) nor (b) is true


Answer: (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.

Quiz of this Question




My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.