1. In C#, a class can

inherit from multiple classes.
implement multiple interfaces.
only implement one interface.

2. Which of the following is NOT the major feature in OOP (Objected-Oriented Programming)?

3. Which keyword is used to prevent a class from being inherited?

4. Which of the following is TRUE in C#?

In subclass, user can add new fields as well as deleting fields from superclass.
Methods declared as abstract don’t have method body
Classes defined sealed can be inherited.
A superclass cannot have a superclass.
A base class can only be inherited once.

5. Which of the following is TRUE for an abstract class?

All methods in an abstract class must define as abstract
All methods in an abstract class cannot be implemented.
Static method cannot be defined as abstract.
Sealed keyword can be used for an abstract method.



Source link

Leave a Reply

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