Sign in to unlock

Get unlimited access to all questions and answers

checked

Get lifetime access

checked

Track progress

checked

Save time

đź‘‹

Hi! Please sign in to edit.

You will receive an email notification when your contribution is accepted.

The fastest way to prepare
for a tech interview

Check our curated list of full-stack, data structures & software architecture interview questions and answers for developers

* If it's yours original answer, you can add a link to your social media account or personal website.
OOP interview questions

OOP interview questions.

Only challenges
Topic progress: 0%
1.

What is object-oriented programming (OOP)?

premium question
completed

Answer:

2.

What is inheritance?

premium question
completed

Answer:

3.

Can you inherit private members of a class?

premium question
completed

Answer:

4.

What is polymorphism?

premium question
completed

Answer:

5.

What is encapsulation?

premium question
completed

Answer:

6.

Why is the virtual keyword used in code?

premium question
completed

Answer:

7.

Explain the concept of constructor?

premium question
completed

Answer:

8.

What is the difference between procedural and object-oriented programming?

premium question
completed

Answer:

9.

What is the difference between a class and a structure?

premium question
completed

Answer:

10.

What is an object?

premium question
completed

Answer:

11.

What is a class?

premium question
completed

Answer:

12.

What is the relationship between a class and an object?

premium question
completed

Answer:

13.

Explain the basic features of OOPs

premium question
completed

Answer:

14.

A structure in C# can implement one or more interfaces. Is it true or false?

premium question
completed

Answer:

15.

What is polymorphism, what is it for, and how is it used?

premium question
completed

Answer:

16.

How can you prevent a class from overriding in C#?

premium question
completed

Answer:

17.

When should I use a struct instead of a class?

premium question
completed

Answer:

18.

What are abstract classes? What are the distinct characteristics of an abstract class?

premium question
completed

Answer:

19.

How can you prevent your class to be inherited further?

premium question
completed

Answer:

20.

What are the different ways a method can be overloaded?

premium question
completed

Answer:

21.

Is it possible for a class to inherit the constructor of its base class?

premium question
completed

Answer:

22.

How is method overriding different from method overloading?

premium question
completed

Answer:

23.

State the features of an interface.

premium question
completed

Answer:

24.

How could you defineAbstraction in OOP?

premium question
completed

Answer:

25.

Can you specify the accessibility modifier for methods inside the interface?

premium question
completed

Answer:

26.

Can you allow a class to be inherited, but prevent a method from being overridden in C#?

premium question
completed

Answer:

27.

What do you mean by data encapsulation?

premium question
completed

Answer:

28.

What are similarities between a class and a structure?

premium question
completed

Answer:

29.

Interface or an Abstract Class: which one to use?

premium question
completed

Answer:

30.

Explain the concept of destructor?

premium question
completed

Answer:

31.

What is Coupling in OOP?

premium question
completed

Answer:

32.

What exactly is the difference between an interface and abstract class?

premium question
completed

Answer:

33.

Explain different types of inheritance.

premium question
completed

Answer:

34.

Differentiate between an abstract class and an interface.

premium question
completed

Answer:

35.

When should I use an interface and when should I use a base class?

premium question
completed

Answer:

36.

What is the difference between an abstract function and a virtual function?

premium question
completed

Answer:

37.

What is the difference between cohesion and coupling?

premium question
completed

Answer:

38.

Does .NET support multiple inheritance?

premium question
completed

Answer:

39.

Can you declare an overridden method to be static if the original method is not static?

premium question
completed

Answer:

40.

What is a static constructor?

premium question
completed

Answer:

41.

What is Cohesion in OOP?

premium question
completed

Answer:

42.

What's the advantage of using getters and setters - that only get and set - instead of simply using public fields for those variables?

premium question
completed

Answer:

43.

Can you declare a private class in a namespace?

premium question
completed

Answer:

44.

In terms that an OOP programmer would understand (without any functional programming background), what is a monad?

premium question
completed

Answer:

45.

What is the difference between association, aggregation and composition?

premium question
completed

Answer:

46.

Can you provide a simple explanation of methods vs. functions in OOP context?

premium question
completed

Answer:

47.

You have defined a destructor in a class that you have developed by using the C# programming language, but the destructor never executed. Why did the destructor not execute?

premium question
completed

Answer:

48.

What is LSP (Liskov Substitution Principle) and what are some examples of its use (good and bad)?

premium question
completed

Answer:

49.

Could you elaborate Polymorphism vs Overriding vs Overloading?

premium question
completed

Answer:

50.

What does it mean to “program to an interface”?

premium question
completed

Answer:

51.

Why Doesn't C# Allow Static Methods to Implement an Interface?

premium question
completed

Answer:

52.

What is the difference between a mixin and inheritance?

premium question
completed

Answer:

53.

Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?

premium question
completed

Answer:

54.

How do I test a private function or a class that has private methods, fields or inner classes?

premium question
completed

Answer:

Reverse Tech Interview: Questions to Stump an Interviewer

Few people want to get into an uncomfortable environment or an unprofitable company with no prospects. If you’re wondering how to get a real feel for a company during an interview, you’re welcome. I’ll give a list of questions that interviewers don’t usually expect...

How to become a programmer, move to the US, and get a dream job

Are you curious about what you need to do to earn more than $15.000 a month, drive a Tesla, live in sunny California, and work at Google, Apple, Facebook, or Amazon?

11 Reactive Systems interview questions and answers for software engineers . Reactive Systems

Reactive systems are an architectural style that allows multiple individual applications to blend into one unit, reacting to their environment, while staying aware of each other. Here is a list of coding interview questions on Reactive Systems to help you get ready...

34 Microservices interview questions and answers for software engineers

Microservice architecture – a variant of the service-oriented architecture structural style – arranges an application as a collection of loosely coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight. Here is a list of coding intervie...

. Microservices
7 Layering & Middleware interview questions for developers

Middleware in the context of distributed applications is software that provides services beyond those provided by the operating system to enable the various components of a distributed system to communicate and manage data. Middleware supports and simplifies complex distributed application...

. Layering & Middleware
55 Docker interview questions and answers for software engineers

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Here is a list of coding interview questions on Docker to help you get ready for your next data structures interview in 2021.

. Docker
23 Databases interview questions and answers for software engineers

A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques. Here is a list of coding interview questions on Databases to help you g...

. Databases
21 Concurrency interview questions and answers for software engineers

In computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome. Here is a list of coding interview questions on Concurrency to help you get ready for your n...

. Concurrency
13 CAP Theorem interview questions and answers for software engineers

In theoretical computer science, the CAP theorem, also named Brewer's theorem after computer scientist Eric Brewer, states that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees: Consistency: Every read receives the ...

. CAP Theorem
18 Caching interview questions and answers for software engineers

Caching is a technique that stores a copy of a given resource and serves it back when requested. Here is a list of coding interview questions on Caching to help you get ready for your next data structures interview in 2021.

. Caching
Load more posts

Features

folder icon

Access all answers

Get the inside track on what to expect in your next tech interview. We offer you a collection of high quality technical interview questions to help you prepare for your next coding interview.

graph icon

Track progress

A smart interface helps you track your progress and focus on the topics you need. You can search through questions or sort them by difficulty or type.

clock icon

Save time

Save tens of hours searching for information on hundreds of low-quality sites designed to drive traffic and make money from advertising.

Land a six-figure job at one of the top companies.

amazon logo facebook logo google logo microsoft logo uber logo
Prepare for a technical interview

Get hired with our
tech interview questions & answers