In this guide
- What the technical round looks like
- Technical interview questions for freshers: what gets asked
- OOP interview questions
- Operating system interview questions
- DBMS interview questions
- SQL interview questions
- Computer networks interview questions
- C and C++ questions for systems roles
- Design questions freshers get
- The project deep dive
- Technical round preparation plan
- Practise on Dronacharya Campus
- Frequently asked questions
Technical interview questions for freshers fall into three buckets: a live DSA problem, CS fundamentals (OOP, operating systems, DBMS and SQL, computer networks), and a deep dive into your own projects. In the candidate reports collected by Dronacharya Campus, about 60% of technical interview rounds at software companies included a DSA problem, a similar share discussed projects or internships, and OOP was the most asked fundamentals subject.
Below is what the reports show about the technical round, followed by the questions that come up most, each with a short model answer outline you can expand in your own words.
What the technical round looks like
These numbers come from 435 candidate reports across 222 companies collected by Dronacharya Campus, which describe 564 technical interview rounds.
- It is almost universal. 410 of 501 hiring processes (82%) had at least one technical interview.
- Usually one or two rounds. 56% of processes had exactly one technical interview, 20% had two, and 5% had three or more.
- About 45 minutes each. The median length was 45 minutes, and most ran 30 to 60 minutes.
- Both online and in person. Where the mode was stated, a little over half of technical interviews were on video calls and the rest in person. Microsoft Teams, Google Meet, Zoom and Webex were the most named tools, with HackerRank CodePair or a shared document for live coding.
- Mostly conversation, often with code. Across all interview rounds, reports tagged 490 with subjective (spoken) questions, 229 with live coding, and 94 with puzzles.
Technical interview questions for freshers: what gets asked
This table covers the 425 technical interview rounds at the 116 software employers in the dataset. Reports often list only headline topics, so treat the shares as lower bounds.
| Area | Share of technical rounds | Companies |
|---|---|---|
| DSA problems and data structure questions | 60% | 81 |
| Projects, resume and internships | 58% | 85 |
| OOP | 22% | 49 |
| Machine learning (mostly data and ML roles) | 16% | 34 |
| DBMS | 14% | 37 |
| Operating systems | 14% | 31 |
| SQL queries | 12% | 27 |
| Puzzles | 10% | 22 |
| Computer networks | 7% | 16 |
| System design | 5% | 18 |
| Computer architecture | 4% | 9 |
Across the whole dataset, including non-software employers, OOP, operating systems, DBMS and SQL are all among the 15 most mentioned topics. Projects are the single most mentioned.
The practical reading: you need DSA and your own projects in every interview, OOP in most, and the systems subjects (OS, DBMS, SQL, networks) as a solid layer of basics. For DSA preparation, see the DSA for placements roadmap. The rest of this post covers CS fundamentals interview questions: the OS, DBMS, CN and OOPs interview questions that come up most, plus SQL, each with an outline of a good answer.
OOP interview questions
OOP was the most frequently asked fundamentals subject. Interviewers often asked candidates to write code, not just define terms: one report describes coding the OOP pillars and virtual functions in a shared editor.
1. Explain the four pillars of OOP with an example.
Encapsulation: bundling data with the methods that act on it and hiding internal state (private fields with public methods). Abstraction: exposing what an object does, not how (an abstract Shape with area()). Inheritance: a class reusing and extending another (Circle extends Shape). Polymorphism: one interface, many behaviours (calling area() on any Shape). Use one running example for all four.
2. What is the difference between compile-time and runtime polymorphism?
Compile-time: function overloading and operator overloading, resolved by the compiler from the signature. Runtime: method overriding through a base class pointer or reference, resolved at run time. In C++ this needs the virtual keyword.
3. How do virtual functions work internally? Each class with virtual functions has a virtual table of function pointers. Each object carries a hidden pointer (vptr) to its class's table. A virtual call follows the vptr to the table and calls the right function. Mention the cost (one extra indirection, one pointer per object) and why base class destructors should be virtual.
4. Abstract class vs interface. An abstract class can hold state and implemented methods alongside abstract ones; a class extends only one in Java. An interface defines a contract that many unrelated classes can implement. In C++, both are modelled with pure virtual functions.
5. Shallow copy vs deep copy, and when do you need a copy constructor? A shallow copy duplicates pointer values, so two objects share the same heap memory and a double delete follows. A deep copy allocates new memory and copies the contents. If a class owns a resource, define the copy constructor, copy assignment and destructor (the rule of three), plus move operations in modern C++.
6. How would you make a class that cannot be instantiated, or only once? Not instantiable: make it abstract, or make the constructor private with only static members. Only once: the singleton pattern, with a private constructor and a static accessor. Mention thread safety for the singleton.
Operating system interview questions
1. Process vs thread. A process has its own address space, file handles and resources. Threads within a process share code, heap and globals but have their own stack and registers. Thread creation and switching are cheaper; the trade-off is that a bug in one thread can corrupt shared data or crash the whole process.
2. What is a deadlock, and how do you prevent it? Four conditions must all hold: mutual exclusion, hold and wait, no preemption, and circular wait. Prevent it by breaking one, most practically circular wait by always acquiring locks in a fixed global order. Also mention avoidance (the Banker's algorithm) and detection with recovery.
3. Mutex vs semaphore. A mutex is a lock with ownership: only the thread that locked it should unlock it, and it protects a critical section. A semaphore is a counter used for signalling; a counting semaphore lets up to N threads in at once. Give an example: a pool of N database connections suits a counting semaphore.
4. Explain virtual memory and paging. Each process sees a large private address space. Memory is divided into fixed-size pages mapped to physical frames by a page table, with the TLB caching recent translations. A page fault occurs when a page is not in RAM and the OS loads it from disk. Benefits: isolation between processes and programs larger than physical memory. Compare with segmentation if asked.
5. Two processes need to update shared memory. How do you keep it correct? A version of this appears in one report. Identify the race condition, then protect the critical section with a lock (a process-shared mutex or a semaphore), keep the critical section small, and discuss what happens if a process dies while holding the lock.
DBMS interview questions
1. What are ACID properties? Atomicity: a transaction happens fully or not at all. Consistency: it moves the database from one valid state to another. Isolation: concurrent transactions do not see each other's partial work. Durability: committed data survives crashes. Use a bank transfer as the example and mention write-ahead logging and locking or MVCC as the mechanisms.
2. Explain normalisation up to BCNF. 1NF: atomic values, no repeating groups. 2NF: no non-key attribute depends on only part of a composite key. 3NF: no non-key attribute depends on another non-key attribute. BCNF: every determinant is a candidate key. Then add the trade-off: denormalisation is sometimes chosen for read performance.
3. Why do indexes speed up queries, and what do they cost? A B+ tree index lets the database find rows in logarithmic time instead of scanning the table. The cost is extra storage and slower inserts, updates and deletes. Mention clustered vs non-clustered indexes and that an index on a low-selectivity column may not help.
4. SQL vs NoSQL, and where does the CAP theorem fit? SQL databases offer schemas, joins and strong transactions. NoSQL stores trade some of that for flexible schemas and horizontal scaling. CAP: under a network partition, a distributed store must choose between consistency and availability. One report describes exactly this pairing of CAP, SQL vs NoSQL and ACID in a first interview round.
SQL interview questions
SQL questions were usually "write the query", sometimes on paper. These are paraphrased from the kinds of tasks candidates reported.
1. Find the second highest salary.
SELECT MAX(salary) FROM employee
WHERE salary < (SELECT MAX(salary) FROM employee);
Be ready to generalise to the nth highest with DENSE_RANK() and to explain how ties are handled.
2. List each employee with their manager's name.
SELECT e.name AS employee, m.name AS manager
FROM employee e
LEFT JOIN employee m ON e.manager_id = m.id;
This is a self join. Use a left join so employees without a manager still appear.
3. How many rows does a join return when keys repeat? If a key appears twice in table A and three times in table B, an inner join produces 2 x 3 = 6 rows for that key. A left join also keeps unmatched rows from A once each, with NULLs on the right.
4. Find duplicate rows by a key.
GROUP BY the key with HAVING COUNT(*) > 1. Know GROUP BY vs WHERE vs HAVING, and window functions like ROW_NUMBER() for deleting duplicates.
Computer networks interview questions
1. What happens when you type a URL into a browser? This came up at several companies in the reports. Cover DNS resolution (browser cache, OS, resolver, then root, TLD and authoritative servers), the TCP handshake, the TLS handshake for HTTPS, the HTTP request and response, and finally the browser parsing HTML, fetching CSS and JavaScript, and rendering. Go as deep as the interviewer wants at each step.
2. Explain the OSI layers with a real example. Walk a video call or web request down the layers: application data, transport (TCP or UDP ports), network (IP routing), data link (frames, MAC addresses), physical. Mention that the TCP/IP model merges some layers.
3. TCP vs UDP. TCP is connection-oriented, reliable and ordered, with flow and congestion control. UDP is connectionless with no delivery guarantees but lower overhead. Video calls and games often use UDP; file transfer and web pages use TCP.
4. HTTP vs HTTPS. HTTPS is HTTP over TLS. During the handshake, the server's certificate proves its identity and public key cryptography is used to agree on a symmetric session key, which then encrypts the traffic.
C and C++ questions for systems roles
Hardware and systems companies went deeper into the language. Topics in the reports include smart pointers, memory leaks, dangling pointers, const placement in pointer declarations, and pass by value vs reference.
unique_ptrvsshared_ptr: sole ownership and move-only, vs reference-counted shared ownership where the object is freed when the count reaches zero.weak_ptrbreaks reference cycles.const int *pvsint *const p: a pointer to a constant value vs a constant pointer to a modifiable value.
Design questions freshers get
Full system design was rare for freshers (about 5% of rounds), but small design questions appeared. The most repeated was designing an LRU cache, which shows up in reports from several companies including Goldman Sachs, Visa and InMobi. The answer: a hash map from key to node plus a doubly linked list ordered by recency, giving O(1) get and put. Designing a URL shortener also appeared more than once. See the Goldman Sachs interview process for how a design and OOP round fit into one company's interviews.
The project deep dive
Projects came up in 58% of technical rounds at software companies, more than any single CS subject. Prepare for each project on your resume:
- A two-minute summary: the problem, your role, the result.
- Why you chose each technology, and what the alternative was.
- The hardest bug or design problem and how you solved it.
- What you would change with more time.
- Numbers you can defend: data size, accuracy, latency, users.
Candidates' advice in the reports was consistent: know every line on your resume, and say clearly when you do not know something instead of guessing.
Technical round preparation plan
The questions above are the core of most technical interview questions for freshers, so a six-week plan is enough if you work through them steadily alongside DSA.
| Weeks before interviews | Focus |
|---|---|
| 6 to 5 | OOP concepts with code in your main language; project write-ups |
| 4 to 3 | OS (processes, threads, synchronisation, deadlocks, memory) and DBMS (ACID, normalisation, indexing) |
| 2 | SQL query practice and computer networks |
| 1 | Mock interviews, out loud, with a timer; revise your weakest subject |
During the interview itself, think aloud. It was among the most repeated pieces of advice in the reports: interviewers want to follow your reasoning, and a clear brute force followed by an optimisation beats silence.
Practise on Dronacharya Campus
The CS fundamentals practice section on Dronacharya Campus covers operating systems, DBMS and SQL, computer networks, OOP and output prediction, with explanations. The CS core check mock test puts these under one timer with negative marking, in the style of technical MCQ sections. To see what a specific company asks in its technical rounds, browse the company hiring process guides. For how the technical round fits into the whole season, read the campus placement preparation guide.
Frequently asked questions
What questions are asked in a technical interview for freshers?
A live DSA problem, questions on your projects and internships, and CS fundamentals: OOP, operating systems, DBMS and SQL, and sometimes computer networks. In reports from software companies collected by Dronacharya Campus, about 60% of technical rounds included DSA and 58% discussed projects.
Which CS subjects are most important for technical interviews?
OOP first; it was the most asked fundamentals subject, appearing in 22% of technical rounds at software companies. DBMS, operating systems and SQL follow at 12% to 14% each. Computer networks appeared less often but the "what happens when you type a URL" question is a favourite.
How long is a technical interview for freshers?
The median in the reports was 45 minutes, with most rounds between 30 and 60 minutes. Most processes had one or two technical rounds.
Are SQL queries asked in technical interviews?
Yes, often as a write-the-query task. Typical ones are the second highest salary, a self join for employee and manager names, duplicates with GROUP BY and HAVING, and reasoning about join row counts. Analyst and data roles test SQL more heavily, sometimes with window functions.
Do freshers get system design questions?
Rarely as a full round; about 5% of technical rounds at software companies mentioned system design. Small design problems such as an LRU cache or a URL shortener are more common, and object-oriented design of a small system also comes up.
How should I prepare my projects for the technical round?
Be able to explain each project in two minutes, justify every technology choice, describe the hardest problem you solved, and defend any numbers on your resume. Interviewers pick a line from your resume and go deep, so leave off anything you cannot explain.