Skip to content

Image, PDF and QR tools that run in your browser. Your files never leave your phone. Explore tools →

CS Fundamentals Interview Questions: OOP, OS and Networks

Resume & career100% freePrivate

The short answer

Core CS questions come up in almost every campus interview. The bank has 12, including the four pillars of OOP, process versus thread, deadlock, virtual memory, TCP versus UDP and the OSI model. Each has a note on what to cover, and a minute is enough for most.

How do you want to use it?

12 questions. Open one to see what a good answer covers.

What are the four pillars of object-oriented programming?
CS fundamentals

Encapsulation (hiding data inside objects), abstraction (showing only what is needed), inheritance (reusing a parent's behaviour) and polymorphism (one interface, many forms). Give a small example of each.

What is the difference between a process and a thread?
CS fundamentals

A process is a running program with its own memory. Threads live inside a process and share its memory, which makes them lighter but needs care to avoid clashes.

What is a deadlock, and how can it be avoided?
CS fundamentals

Two or more processes each hold a resource and wait for another's, so none can continue. It needs mutual exclusion, hold and wait, no pre-emption and circular wait. Break one of these, for example by always taking locks in the same order.

What is virtual memory?
CS fundamentals

A technique that lets a program use more memory than the computer physically has by moving unused pages between RAM and disk. It also isolates programs from each other.

What is the difference between TCP and UDP?
CS fundamentals

TCP is reliable, ordered and connection-based, used for web pages and email. UDP is faster with no delivery guarantee, used for video calls and games.

What are the layers of the OSI model?
CS fundamentals

Physical, data link, network, transport, session, presentation and application. Be ready to place familiar things on them, such as IP on the network layer and HTTP on the application layer.

What is a REST API?
CS fundamentals

A way for programs to talk over HTTP using URLs for things and methods such as GET, POST, PUT and DELETE for actions. Each request carries all it needs, and data is often sent as JSON.

What is the difference between a compiler and an interpreter?
CS fundamentals

A compiler translates the whole program to machine code before it runs. An interpreter reads and runs it line by line. Many languages, such as Java and Python, use a mix.

What is the difference between stack and heap memory?
CS fundamentals

The stack holds function calls and local variables and is fast and automatically managed. The heap holds objects that live longer and is managed by the programmer or a garbage collector.

What is Git, and what is the difference between merge and rebase?
CS fundamentals

Git tracks changes to code. Merge joins two branches and keeps both histories, while rebase replays your commits on top of another branch for a straight history. Do not rebase shared branches.

What is the difference between SQL and NoSQL databases?
CS fundamentals

SQL databases store data in tables with a fixed structure and relations. NoSQL databases, such as document or key-value stores, are more flexible and scale across machines easily. Choose by the data and the queries.

What is a primary difference between authentication and authorisation?
CS fundamentals

Authentication checks who you are, for example with a password. Authorisation decides what you are allowed to do once you are known.

Everything runs in your browser. What you type is not sent anywhere.

How to: CS Fundamentals Interview Questions: OOP, OS and Networks

  1. 1Read the question and give a one-line definition aloud.
  2. 2Add one real-life example to show you understand it.
  3. 3Open the tip and see what you missed.
  4. 4Practise again with the timer.

At a glance

Questions
12 CS fundamentals questions
Includes
OOP, operating systems, networks
Time to aim for
About 60 seconds each

Frequently asked questions

How do I explain a deadlock simply?

Say it is when two tasks each hold something the other needs, so both wait forever. Then give the four conditions and one way to avoid it, which the tip lists.

Do I need to memorise all seven OSI layers?

Know their order and what each does in a line. Interviewers rarely want more than that from a fresher, but they do like a real example.

More quick answers