Monday, 13 February 2017

OOPS interview questions and answers

What is OOPS?

OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.

Write basic concepts of OOPS?

Following are the concepts of OOPS and are as follows:
- Abstraction.
- Encapsulation.
- Polymorphism.

What is class?

What is an object?

What is the relationship between a class and an object?

Explain the basic features of OOPs.

What is the difference between arrays and collection?. 

What is Encapsulation?

What is Polymorphism?

What is Inheritance?

What is Constructor?

Types of Constructors

Define Destructor?

What is Inline function?

What is operator overloading?

Different between method overriding and  method overloading? 

What is this keywords?

What is super keyword?

What is an abstract class?

What is final keywords?

What is abstract method?

What is virtual method?

Can struct be inherited?

What is static field

What is Static method

What is inheritance?

What is virtual keyword?

What is new modiefiers?

What is abstract class?

What is sealed modifiers?

What is an interface?

When to use interface over abstract class?

What is pure virtual function?

Can we specify the access modifier for explicityly interface method?

What is protected access modifier in c#?

What is public access modifer in C#?

What is private access modifier in C#?

What is internal access modifier in C#?

What is protected internal access modifier in C#?

Default access modifiers in C#?

What is method overloading?

What is overriding?

What is method overriding? How to override a function in c#?

Can we call a base class method without creating instance?

In which cases you use override and new base?

Difference between new and override keywords?

What is private constructor? Where will you use it?

Can we declare private class in a namespace?

What is polymorphism?

What are attributes in dot.net?

What can you do to make class available for inheritance but  you need prevent it's method to come in inheritance chain?

What's the difference between Interface and Abstract class?

What are the various types of Constructors?

What are constructors?

When to use abstract classes and when interfaces?

What is early binding and late binding?

How's method overriding different from overloading?

What does the keyword virtual mean in method definition?

Can you declare the override method static while the original method is non-static?

Can you override private virtual methods?

Can you prevent your class from being inherited and becoming a base class for some other classes?

Can you allow class to be inherited , but prevent method from being over-ridden?

Why can't you specify the accessibility modifier for methods inside the interface?

Static datamembers should be initialized inside the constructor. True or False.

Static methods can not use non static members. True or false.

A constructor can be private. True or false.

Difference between sealed and static classes.

Can we have an abstract class without having any abstract method?

No comments:

Post a Comment