It is C# basic interview question for beginners level.
1. What is Class?
Ans: Collection of objects is called class. It is a logical entity.
A class can also be defined as a blueprint from which you can create an individual object. Class doesn't consume any space.
2. Difference between Class and Objects?
Ans: Any entity that has state and behavior is known as an object. An Object can be defined as an instance of a class. An object contains an address and takes up some space in memory.
3. What is Oops concept?
a. What is inheritance?
Ans: When one object acquires all the properties and behaviors of a parent object, it is known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism.
b. What is Encapsulation?
Ans: Binding (or wrapping) code and data together into a single unit are known as encapsulation.
c. What is Polymorphism?
Ans: If one task is performed by different ways, it is known as polymorphism.
d. What is Abstract?
Ans: Hiding internal details and showing functionality is known as abstraction