30 questions · 4 rounds
Fresher campus placement interview questions
Questions from real Freshers and campus rounds, grouped by the round that asks them. Open one for the follow-ups, what a strong answer covers and the traps. Then say your answer out loud: see the Freshers and campus mock interview.
Part 1 · 13 questions
Technical interview
Deadlock and its four conditions
Operating systems · Concept · Fresher
What is a deadlock? Give me a real-life example, then tell me the four conditions that must all be true for it to happen.
The lab server crawls during an exam
Operating systems · Scenario · Fresher
During a lab exam, 60 students run their programs on one shared Linux server with 8 GB of RAM. After a few minutes everything becomes extremely slow: typing takes seconds to show. The CPU…
How many times does fork print?
Operating systems · Write code · Fresher
How many times does this C program print hello, and why? Then tell me what fork returns. (code)
Passes the samples, then Time Limit Exceeded
Programming basics · Scenario · Fresher
Your solution to 'count the pairs whose sum equals k' passes the sample tests, but the hidden tests say 'Time Limit Exceeded'. The time limit is one second. Walk me through what you'd…
A swap function that doesn't swap
Programming basics · Write code · Fresher
What does this C++ program print, and why does each swap behave the way it does? (code)
Reverse a string without library functions
Programming basics · Build it · Fresher
Write a function that reverses a string in place, without using any library function for reversing. Then use the same idea to check whether a string is a palindrome.
TCP or UDP for four apps
Computer networks · Trade-off · Fresher
For each of these, would you use TCP or UDP, and why: a file download, a live video call, an online multiplayer game, and a DNS lookup?
How DNS finds a website's address
Computer networks · Concept · Fresher
When you type a website's name, how does your computer find its IP address? Walk me through the DNS lookup step by step.
A friend can't open your project from their laptop
Computer networks · Scenario · Fresher
Your project runs on your laptop and opens fine at localhost port 3000. Your friend on the same hostel Wi-Fi types your laptop's IP address with port 3000, and it doesn't open. What could…
Department-wise count and the second highest salary
DBMS · Build it · Fresher
We have an employee table with id, name, salary and dept_id, and a department table with dept_id and dept_name. Write a query that shows each department's name and how many employees it…
Fee deducted but not marked paid
DBMS · Scenario · Fresher
Your college fee app first takes the money from the student's wallet and then adds a row to the payments table. One day the server crashed between those two steps. A student's money is…
Find the four pillars in this code
OOP · Write code · Fresher
What does this Java program print? Then point to where it shows each of the four pillars of OOP. (code)
Shape: abstract class or interface?
OOP · Trade-off · Fresher
You're writing a drawing app with circles, rectangles and triangles. Every shape has a colour and an area. Would you make Shape an abstract class or an interface, and why? What if some…
Part 2 · 3 questions
Coding round
Valid parentheses (LeetCode 20)
DSA · Build it · Fresher
Given a string of brackets, ()[]{}, return whether it's balanced.
3Sum variant (LeetCode 15)
DSA · Build it · Fresher
Find all unique triplets in the array that sum to a target.
Car pooling (LeetCode 1094)
DSA · Build it · Fresher
A car with capacity C only drives east. Given trips as [passengers, from, to], can it complete all of them?
Part 3 · 12 questions
Programming language round
Does Java pass objects by reference?
Core Java and OOP · Write code · Fresher
What does this print? Then tell me: does Java pass objects by reference or by value? (code)
final, finally and finalize
Core Java and OOP · Concept · Fresher
What's the difference between final, finally and finalize? And what does static mean on a field, a method and a block?
A nightly CSV job that got very slow
Core Java and OOP · Scenario · Fresher
A nightly job builds a settlement CSV of yesterday's transactions and uploads it to the bank. A year ago it took five minutes. Now there are four times as many rows and it takes almost…
Assignment, shallow copy and deep copy
Python core · Concept · Fresher
For a list of dictionaries, what's the difference between b = a, copy.copy(a) and copy.deepcopy(a)? Which would you use, and when?
List comprehension or generator expression for crores of rows
Python core · Trade-off · Fresher
You need the total amount from 5 crore transaction rows read from a file. Would you use a list comprehension, a generator expression, or a plain loop? Why?
The default list that remembers
Python core · Write code · Fresher
What does this print, and why? How would you fix the function? (code)
ArrayList or LinkedList
Java collections · Trade-off · Fresher
When would you choose LinkedList over ArrayList? Give me a real case from a backend service.
Removing items inside a for-each loop
Java collections · Write code · Fresher
This code removes expired orders from a list. Sometimes it throws, and sometimes it silently leaves an expired order in the list. Why? How do you fix it? (code)
Class attributes, instance attributes, classmethod and staticmethod
Python OOP and typing · Concept · Fresher
What's the difference between a class attribute and an instance attribute? And between a normal method, a @classmethod and a @staticmethod? When do you use each?
dataclass, Pydantic model or attrs
Python OOP and typing · Trade-off · Fresher
You need a class for an order: id, customer, items, amount and created time. Would you use a dataclass, a Pydantic model, attrs, or a plain class? What changes if the data comes from a…
A generator pipeline over a 20 GB log file
Python coding · Build it · Fresher
We have a 20 GB access log, one request per line: time, path, status and response time in milliseconds. Write Python that finds the 10 paths with the most 5xx errors, with their average…
Removing items while looping over a list
Python coding · Write code · Fresher
We want to remove all even numbers. What does this print, and why? Show two correct ways. (code)
Part 4 · 2 questions
HR interview
Tell me about yourself, as a fresher
Fresher projects and HR · Your experience · Fresher
Tell me about yourself.
Relocation, night shifts and a service agreement
Fresher projects and HR · Scenario · Fresher
We may place you in any of our offices in India, on a project with rotational or night shifts, and this offer has a one-year service agreement. Are you okay with all three? Tell me honestly.
Reading is not answering. Say it out loud.
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.