IT Technical Interview Questions &
Answers
Programming (C, Java, Python – General OOP)
1. Q: Difference between C, C++ and Java?
A: C: Procedural language, no OOP, no classes/objects.
C++: Extension of C, supports procedural & OOP, multiple inheritance.
Java: Pure OOP, platform-independent, runs on JVM.
2. Q: Difference between JDK, JRE, JVM?
A: JDK: Java Development Kit, includes compiler + JRE + tools.
JRE: Java Runtime Environment, contains JVM + libraries.
JVM: Executes bytecode, makes Java platform-independent.
3. Q: Explain OOP concepts.
A: Encapsulation: Wrapping data + methods in a class.
Abstraction: Hiding implementation, showing only functionality.
Inheritance: Acquiring properties from parent.
Polymorphism: Many forms → overloading (compile-time) and overriding (runtime).
4. Q: Constructor vs Method in Java.
A: Constructor: Initializes objects, same name as class, no return type.
Method: Performs actions, has a return type, must be called explicitly.
5. Q: Method Overloading vs Method Overriding.
A: Overloading: Same method name, different parameters, compile-time.
Overriding: Subclass redefines parent’s method, runtime.
6. Q: Abstract class vs Interface.
A: Abstract class: Can have abstract & non-abstract methods, supports inheritance, can have
variables.
Interface: Fully abstract (before Java 8), supports multiple inheritance.
7. Q: What is Exception Handling?
A: Mechanism to handle runtime errors using try, catch, finally, throw, throws.
8. Q: Checked vs Unchecked Exceptions.
A: Checked: Checked at compile time (IOException).
Unchecked: Occur at runtime (NullPointerException).
9. Q: String vs StringBuilder vs StringBuffer.
A: String: Immutable.
StringBuilder: Mutable, not thread-safe, faster.
StringBuffer: Mutable, thread-safe, slower.
10. Q: Write programs: Reverse, Factorial, Fibonacci, Palindrome.
A: Reverse String: new StringBuilder(s).reverse().toString().
Factorial: recursion/multiplication.
Fibonacci: iterative series.
Palindrome: reverse and compare.
11. Q: Difference between Stack and Heap memory.
A: Stack: Stores method calls, local variables, fast, limited.
Heap: Stores objects, dynamic allocation, slower but large.
Data Structures & Algorithms
12. Q: Array vs Linked List.
A: Array: Fixed size, contiguous memory, faster access.
Linked List: Dynamic size, elements linked with pointers, slower access, easy insert/delete.
13. Q: Explain Stack and Queue.
A: Stack: LIFO (Undo operations).
Queue: FIFO (Printer jobs).
14. Q: Difference between Linear Search and Binary Search.
A: Linear: Sequential O(n).
Binary: Sorted array, divide in half, O(log n).
15. Q: Explain Hashing.
A: Key → index mapping using hash functions, fast retrieval (e.g., HashMap).
16. Q: DFS vs BFS.
A: DFS: Depth-first, uses stack/recursion.
BFS: Breadth-first, uses queue.
17. Q: Find Largest Element in Array.
A: Traverse array, compare elements, track max.
18. Q: Sorting Algorithms.
A: Bubble: Swap adjacent elements repeatedly, O(n^2).
Selection: Pick min/max, place at position, O(n^2).
Quick Sort: Divide and conquer, O(n log n).
Database (SQL)
19. Q: Difference between DBMS and RDBMS.
A: DBMS: General database system, no relationships.
RDBMS: Stores in relational tables, SQL-based.
20. Q: What are Primary Key, Foreign Key, Unique Key?
A: Primary Key: Unique + Not Null.
Foreign Key: Refers to another table.
Unique Key: Unique but can have nulls.
21. Q: Difference between DELETE, TRUNCATE, DROP.
A: DELETE: Removes rows, can rollback.
TRUNCATE: Removes all rows, faster, no rollback.
DROP: Deletes entire table structure.
22. Q: Explain different types of Joins.
A: INNER: Common rows.
LEFT: All from left, matching right.
RIGHT: All from right, matching left.
FULL: All records from both.
23. Q: SQL Query to fetch 2nd highest salary.
A: SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM
employees);
24. Q: Difference between WHERE and HAVING.
A: WHERE: Filters before grouping.
HAVING: Filters after grouping.
25. Q: What is Normalization & Denormalization?
A: Normalization: Reducing redundancy (1NF, 2NF, 3NF).
Denormalization: Adding redundancy for performance.
Operating System & Networking
26. Q: Difference between Process and Thread.
A: Process: Independent, has own memory.
Thread: Lightweight, shares process memory.
27. Q: What are Deadlock conditions?
A: Mutual exclusion, Hold & wait, No preemption, Circular wait.
28. Q: What is Virtual Memory?
A: Using hard disk as RAM extension for efficient memory management.
29. Q: Scheduling Algorithms in OS.
A: FCFS: First come, first served.
SJF: Shortest job first.
Round Robin: Time slice-based.
30. Q: Difference between TCP and UDP.
A: TCP: Reliable, connection-oriented (HTTP, FTP).
UDP: Fast, connectionless (video streaming).
31. Q: What is IP Address (IPv4 vs IPv6).
A: IPv4: 32-bit, limited.
IPv6: 128-bit, supports more devices.
32. Q: Difference between Switch, Hub, Router.
A: Hub: Broadcasts to all.
Switch: Sends to specific device (MAC).
Router: Connects networks (IP).
Software Engineering / SDLC
33. Q: What is SDLC?
A: Software Development Life Cycle. Models: Waterfall (sequential), Agile (iterative), Spiral
(risk-driven).
34. Q: What is Agile methodology?
A: Iterative, flexible approach, feedback-driven, uses Scrum framework.
35. Q: Difference between Black-box and White-box Testing.
A: Black-box: No internal code knowledge.
White-box: Internal code knowledge.
36. Q: Difference between Unit Testing and Integration Testing.
A: Unit: Testing smallest modules.
Integration: Testing combined modules.
Cloud / Latest Tech
37. Q: What is Cloud Computing?
A: Delivery of services like storage, compute via the internet.
38. Q: Difference between IaaS, PaaS, SaaS.
A: IaaS: Infrastructure (AWS EC2).
PaaS: Platform (Google App Engine).
SaaS: Software (Gmail).
39. Q: What is Version Control?
A: System to track code changes (Git, GitHub).
40. Q: What is CI/CD pipeline?
A: Continuous Integration and Continuous Deployment for automation.
HR + Technical Mix
41. Q: Explain your Final Year Project.
A: Be clear: Problem, tech used, role, challenges, outcomes.
42. Q: If given new language, how will you learn?
A: Start with basics, docs, practice small projects, apply gradually.
43. Q: Why should we hire you?
A: Strong fundamentals, quick learner, adaptable, team-oriented.