250 Interview Questions with Sample Answer

Posted on: Thu Jun 26 2025

1. Tell me about yourself.
Answer: I'm a final-year student with a keen interest in problem-solving and software development. I've practiced over 300 coding problems and worked on projects in web development. I enjoy learning and applying new technologies.

2. What are your strengths?
Answer: I’m consistent, quick to learn, and I handle pressure well. I also enjoy working in teams and taking ownership of tasks.

3. What are your weaknesses?
Answer: I used to struggle with public speaking, but I’ve been improving through seminars and group presentations.

4. Why do you want to join our company?
Answer: Your company offers great learning and growth opportunities. I admire your work culture and would love to be part of a team that delivers quality software solutions.

5. What do you know about our company?
Answer: I know that [Insert Company] is one of the top IT service providers with global clients. I’ve also read about your recent focus on cloud and AI projects.

6. Why should we hire you?
Answer: I have the right blend of technical skills, eagerness to learn, and a strong work ethic. I’m confident I can contribute positively to your team.

7. What is OOP?
Answer: Object-Oriented Programming is a style of programming based on objects and classes. It follows four principles: Encapsulation, Abstraction, Inheritance, and Polymorphism.

8. What is the difference between C and C++?
Answer: C is a procedural language, while C++ supports both procedural and object-oriented programming.

9. What is the use of a constructor?
Answer: A constructor is a special method that initializes an object. It has the same name as the class and no return type.

10. Explain the concept of inheritance.
Answer: Inheritance allows a class to use properties and methods of another class, promoting code reusability.

11. What is the difference between == and .equals() in Java?
Answer: == checks if two references point to the same object, while .equals() checks the content of the objects.

12. What is recursion?
Answer: Recursion is when a function calls itself to solve a smaller part of the problem.

13. What is an array?
Answer: An array is a data structure that stores elements of the same type at contiguous memory locations.

14. What are pointers in C?
Answer: A pointer is a variable that holds the address of another variable.

15. What is abstraction?
Answer: Abstraction hides the internal details and shows only essential features to the user.

16. What is encapsulation?
Answer: Encapsulation binds data and functions together and keeps them safe from outside interference.

17. What is polymorphism?
Answer: Polymorphism allows one interface to be used for a general class of actions. Example: method overloading and overriding.

18. Difference between compile-time and runtime polymorphism?
Answer: Compile-time is method overloading; runtime is method overriding.

19. What is a class and object?
Answer: A class is a blueprint. An object is an instance of a class.

20. What is a virtual function?
Answer: A virtual function in C++ allows derived classes to override it, ensuring dynamic binding at runtime.

21. What are access modifiers?
Answer: Access modifiers define the scope of classes, variables, and methods. Examples: public, private, protected.

22. What is the difference between stack and heap memory?
Answer: Stack stores local variables and functions; heap stores objects and supports dynamic memory allocation.

23. What is garbage collection in Java?
Answer: It’s the process of reclaiming memory used by unreferenced objects.

24. What is the difference between process and thread?
Answer: A process is an independent program; a thread is a smaller unit of a process.

25. What is deadlock?
Answer: Deadlock is a situation where two or more processes wait for each other to release resources, causing a standstill.

26. What is multithreading?
Answer: Running multiple threads (small processes) simultaneously to improve performance.

27. Explain SDLC.
Answer: Software Development Life Cycle is a process for planning, developing, testing, and deploying software.

28. What are the phases of SDLC?
Answer: Requirements, Design, Development, Testing, Deployment, Maintenance.

29. What is Agile?
Answer: Agile is a flexible development methodology that delivers small parts of a project in iterations with constant feedback.

30. What is Scrum?
Answer: Scrum is a type of Agile framework with sprints, daily standups, and roles like Scrum Master and Product Owner.

31. What is normalization in DBMS?
Answer: It's the process of organizing data to reduce redundancy and improve data integrity.

32. What is a primary key?
Answer: A primary key uniquely identifies each record in a table.

33. What is a foreign key?
Answer: A foreign key is a field in one table that refers to the primary key in another.

34. Difference between DELETE and TRUNCATE?
Answer: DELETE removes specific rows; TRUNCATE removes all rows quickly and cannot be rolled back.

35. What is SQL injection?
Answer: A security flaw where attackers execute malicious SQL statements through input fields.

36. Write a query to find the second highest salary.
Answer:

SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);

 

37. What is the use of GROUP BY?
Answer: It groups rows that have the same values so aggregate functions like COUNT or SUM can be applied.

38. Difference between HAVING and WHERE?
Answer: WHERE filters rows before grouping; HAVING filters after grouping.

39. What is JOIN in SQL?
Answer: JOIN combines rows from two or more tables based on related columns.

40. What is INNER JOIN?
Answer: It returns rows with matching values in both tables.

41. What is LEFT JOIN?
Answer: It returns all rows from the left table and matching rows from the right table.

42. What is an index in SQL?
Answer: It improves query speed by creating a quick lookup for data in a table.

43. What is a view in SQL?
Answer: A view is a virtual table based on the result-set of a query.

44. What is a trigger?
Answer: A trigger automatically executes a specified SQL script when certain events occur in a table.

45. What is an API?
Answer: An API is a set of rules that allows two applications to communicate with each other.

46. What is REST API?
Answer: REST is an API design approach based on standard HTTP methods like GET, POST, PUT, DELETE.

47. What is version control?
Answer: It helps track changes to code. Git is a popular tool for this.

48. What is Git?
Answer: Git is a distributed version control system that helps teams manage code changes.

49. What is a pull request?
Answer: It's a request to merge code changes into the main project, usually reviewed before approval.

50. What is a merge conflict in Git?
Answer: It happens when two branches have changes to the same part of the code. It must be resolved manually.

51. What is exception handling in Java?
Answer: It’s a mechanism to handle runtime errors so the program doesn’t crash. Try-catch blocks are commonly used.

52. What is the difference between throw and throws?
Answer: throw is used to throw an exception, while throws is used to declare exceptions in a method signature.

53. What is the purpose of a finally block?
Answer: The finally block always executes whether or not an exception is thrown, often used to clean up resources.

54. Explain method overloading.
Answer: When two or more methods in the same class have the same name but different parameters.

55. Explain method overriding.
Answer: When a subclass provides a specific implementation of a method already defined in its superclass.

56. What is a static keyword in Java?
Answer: It’s used to define class-level variables or methods that don’t need an object to be accessed.

57. What is the difference between static and final in Java?
Answer: static relates to class-level context, while final means a variable or method cannot be changed or overridden.

58. What is the difference between abstract class and interface?
Answer: Abstract class can have both abstract and concrete methods; interface only has abstract methods (until Java 8+).

59. What is multilevel inheritance?
Answer: When a class is derived from a class, which is also derived from another class.

60. What is hybrid inheritance?
Answer: It combines two or more types of inheritance. Not supported directly in Java due to ambiguity issues.

61. Explain the lifecycle of a thread.
Answer: New → Runnable → Running → Blocked/Waiting → Terminated.

62. What is synchronization in Java?
Answer: It’s used to control access to shared resources by multiple threads to prevent inconsistency.

63. What is a race condition?
Answer: It occurs when multiple threads access and modify shared data concurrently, leading to unexpected results.

64. Difference between String and StringBuilder?
Answer: String is immutable; StringBuilder is mutable and more efficient for modifications.

65. How is memory managed in Python?
Answer: Python uses automatic memory management with reference counting and garbage collection.

66. What are Python lists and tuples?
Answer: Lists are mutable; tuples are immutable sequences used to store collections of items.

67. What is the difference between Java and Python?
Answer: Java is statically typed and compiled; Python is dynamically typed and interpreted. Python has simpler syntax.

68. What is recursion? Give a real-life analogy.
Answer: Like Russian dolls — solving a problem by solving a smaller version of the same problem.

69. What is the base case in recursion?
Answer: It’s the condition under which the recursion ends.

70. How do you reverse a string in C++?
Answer: You can use the reverse() function from <algorithm> or loop through the string from end to start.

71. What is bubble sort?
Answer: A simple sorting algorithm that repeatedly swaps adjacent elements if they’re in the wrong order.

72. What is time complexity of binary search?
Answer: O(log n), since it divides the array in half every time.

73. What is linear search?
Answer: It goes through each element one by one until the target is found.

74. Difference between array and linked list?
Answer: Arrays have fixed size and allow random access; linked lists are dynamic and allow easy insert/delete.

75. What is a stack?
Answer: A data structure that follows Last In, First Out (LIFO).

76. What is a queue?
Answer: A data structure that follows First In, First Out (FIFO).

77. What is a binary tree?
Answer: A tree structure where each node has up to two children — left and right.

78. What is a binary search tree (BST)?
Answer: A binary tree where left < root < right; used for efficient searching.

79. What is a hash table?
Answer: A data structure that maps keys to values using a hash function for quick lookup.

80. Explain DFS and BFS.
Answer: DFS explores depth first, using recursion/stack. BFS explores level-by-level, using a queue.

81. What is dynamic programming?
Answer: A technique to solve problems by storing results of subproblems to avoid recomputation.

82. What is memoization?
Answer: A type of dynamic programming where results are stored in a map/dictionary for reuse.

83. What is the use of the this keyword in Java?
Answer: Refers to the current object of a class.

84. Explain the difference between public, private, and protected.
Answer: Public: accessible everywhere. Private: only within the class. Protected: within class & subclasses.

85. What is an exception?
Answer: An event that disrupts the normal flow of the program — often runtime errors.

86. What is an IDE?
Answer: Integrated Development Environment — software like VS Code, Eclipse, etc., used to write, debug, and run code.

87. What is a use case of arrays in real life?
Answer: Storing student marks, list of items in a shopping cart, etc.

88. What is recursion’s biggest drawback?
Answer: Risk of stack overflow due to too many function calls; inefficient for large inputs.

89. What is Big O Notation?
Answer: A way to describe the performance or complexity of an algorithm as input size grows.

90. How do you test your code?
Answer: I use sample inputs, edge cases, and automated test cases when possible.

91. Why did you choose this field (IT/software)?
Answer: I enjoy problem-solving and building things using logic and creativity. That led me to tech.

92. Tell me about a challenging project you worked on.
Answer: I once built a college event registration portal with limited time. Learned teamwork and time management.

93. What is the difference between coding and programming?
Answer: Coding is writing code; programming is a broader process including problem-solving, design, testing, etc.

94. What motivates you?
Answer: Solving real problems, learning new things, and building solutions that help people.

95. How do you handle failure?
Answer: I analyze what went wrong, learn from it, and improve myself to avoid repeating mistakes.

96. Are you open to relocation?
Answer: Yes, I’m flexible and willing to relocate wherever required by the company.

97. What are your career goals?
Answer: In the short term, to be a good team contributor. In the long term, to become a software architect or team lead.

98. How do you keep yourself updated with tech trends?
Answer: I follow tech blogs, YouTube channels, and practice on platforms like LeetCode and GeeksforGeeks.

99. What do you do in your free time?
Answer: I enjoy reading tech articles, listening to podcasts, and working on personal coding projects.

100. Do you have any questions for us?
Answer: Yes, I’d love to know more about the team I’ll be working with and any upcoming projects you’re excited about.

101. How do you prioritize tasks in a project?
Answer: I list down tasks based on deadlines and importance. I use tools like Trello or simple to-do lists to track progress.

102. Describe a time when you worked in a team.
Answer: During my final year project, I worked with a team of four. We divided tasks and held regular discussions to ensure we were on track.

103. What is the difference between interface and abstract class in Java?
Answer: Interface can only have abstract methods (till Java 7), while an abstract class can have both abstract and non-abstract methods.

104. Can you write a program to check if a string is a palindrome?
Answer: Yes. You reverse the string and check if it’s the same as the original.

105. Write a Python code to find the factorial of a number.

def factorial(n):

    return 1 if n == 0 else n * factorial(n-1)

 

106. What is the difference between list and array in Python?
Answer: Lists are more flexible and can store different types; arrays are more efficient for numeric computations.

107. What is normalization and why is it important?
Answer: It organizes data to reduce redundancy and ensure data integrity.

108. Explain the concept of foreign key.
Answer: A foreign key in one table points to the primary key of another to establish a relationship.

109. What are the types of SQL JOINs?
Answer: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN.

110. What are ACID properties in DBMS?
Answer: Atomicity, Consistency, Isolation, Durability – they ensure reliable database transactions.

111. What is the use of COUNT() in SQL?
Answer: It returns the number of rows in a result set.

112. What is a subquery?
Answer: A query nested inside another query.

113. Write an SQL query to get employees with salary > 50000.

SELECT * FROM employees WHERE salary > 50000;

 

114. What is software testing?
Answer: It’s the process of evaluating software to find bugs and ensure it meets requirements.

115. Difference between black box and white box testing?
Answer: Black box tests functionality without knowing internal code; white box tests logic and code structure.

116. What is unit testing?
Answer: Testing individual components or functions of the program.

117. What is integration testing?
Answer: It checks how modules work together as a whole.

118. What is regression testing?
Answer: Testing after changes to ensure new code doesn't break existing functionality.

119. What is the waterfall model?
Answer: A linear SDLC model where each phase must be completed before moving to the next.

120. What is the V-model?
Answer: It maps development phases to testing phases directly, like Verification vs Validation

121. What is the difference between Agile and Waterfall?
Answer: Agile is iterative and flexible; Waterfall is linear and rigid.

122. What is a sprint in Agile?
Answer: A fixed time period (usually 1–4 weeks) during which a set of tasks are completed.

123. Who is a Scrum Master?
Answer: A facilitator who ensures the Agile process is followed and removes blockers.

124. What is the Product Backlog?
Answer: A list of features and enhancements maintained by the product owner.

125. Explain pair programming.
Answer: Two developers work together — one writes code, the other reviews in real-time.

126. What are design patterns?
Answer: Reusable solutions to common software design problems (e.g., Singleton, Factory).

127. What is a Singleton class?
Answer: A class that allows only one instance to exist at a time.

128. What is the difference between stack and queue?
Answer: Stack is LIFO (Last In First Out); Queue is FIFO (First In First Out).

129. What are the different types of loops in C?
Answer: for, while, and do-while.

130. What is an infinite loop?
Answer: A loop that doesn’t terminate unless externally interrupted, often due to missing a condition.

131. What is a segmentation fault?
Answer: An error that occurs when a program tries to access restricted memory.

132. How do you prevent memory leaks in C?
Answer: By freeing dynamically allocated memory using free() after usage.

133. What is a macro in C?
Answer: A preprocessor directive used to define constants or code snippets.

134. What is the use of the const keyword?
Answer: It makes a variable’s value unchangeable after initialization.

135. What is the purpose of sizeof() in C?
Answer: It returns the memory size (in bytes) of data types or variables.

136. What is dynamic memory allocation?
Answer: Allocating memory at runtime using malloc(), calloc(), etc.

137. What is an algorithm?
Answer: A step-by-step procedure to solve a problem.

138. What is pseudocode?
Answer: A high-level description of an algorithm, not written in a specific programming language.

139. What is the difference between algorithm and program?
Answer: Algorithm is a logic plan; program is its implementation in a language.

140. What is the difference between compiler and interpreter?
Answer: Compiler translates entire code before execution; interpreter translates line-by-line.

141. What is the difference between local and global variables?
Answer: Local variables are declared inside a function; global ones are outside and accessible throughout.

142. What is recursion depth?
Answer: It’s how many levels deep a recursive function can go before causing a stack overflow.

143. What is the difference between pass-by-value and pass-by-reference?
Answer: Pass-by-value sends a copy; pass-by-reference sends the original, allowing modifications.

144. How would you debug a code that isn’t working?
Answer: Use print statements or debugging tools, analyze output, and isolate errors step-by-step.

145. What is the role of a software developer in a team?
Answer: To design, write, test, and maintain code that solves real-world problems.

146. What is your approach when you don’t know the answer to a coding question?
Answer: I break it down, try brute force if needed, and optimize later. If I still struggle, I ask clarifying questions.

147. What is the difference between GET and POST in APIs?
Answer: GET is used to retrieve data; POST is used to send data to the server.

148. What is RESTful architecture?
Answer: It follows a stateless communication protocol using HTTP methods for API interaction.

149. What is a full stack developer?
Answer: A developer who can handle both front-end and back-end parts of a web application.

150. Are you comfortable working in shifts or client-based roles?
Answer: Yes, I’m adaptable and open to company requirements, including shifts or client projects.

151. How do you handle feedback or criticism?
Answer: I take feedback positively. It helps me grow. I try to understand the suggestion and work on improving that area.

152. How would you explain your final year project to a non-technical person?
Answer: I would break it down using simple words and real-life comparisons. For example, if it’s a shopping cart system, I’d relate it to how Amazon works.

153. Have you ever missed a deadline? What did you do?
Answer: Once during a mini-project, I underestimated the time for testing. I informed my mentor early and worked extra hours to finish it.

154. How do you stay motivated during tough times?
Answer: I remind myself of my goals and how far I’ve come. Taking short breaks and watching tech videos also recharges me.

155. How do you explain technical terms to clients or non-tech team members?
Answer: I use simple language, visuals, and analogies they can relate to, like comparing data to books in a library.

156. What is your biggest achievement so far?
Answer: Building my first web app from scratch using HTML, CSS, JS, and Firebase — it helped over 500 students during campus events.

157. Describe a time you resolved a conflict in a team.
Answer: In college, two teammates had different opinions. I listened to both, facilitated a group discussion, and helped us reach a compromise.

158. What do you know about SDLC models?
Answer: SDLC models define steps in software development. Examples: Waterfall (linear), Agile (iterative), Spiral (risk-focused).

159. What is the difference between bug and error?
Answer: An error is a coding mistake. A bug is the result of that error which causes unexpected behavior.

160. What is the difference between verification and validation?
Answer: Verification checks if we're building the product right; validation checks if we built the right product.

161. What is a breakpoint in debugging?
Answer: A breakpoint is a marker set in code where the execution will pause, allowing developers to inspect variables and flow.

162. What is a dry run?
Answer: Manually going through code line by line to predict the output or find logical mistakes.

163. What is test case?
Answer: A test case is a set of conditions under which a tester checks whether the software behaves as expected.

164. What’s the difference between front-end and back-end?
Answer: Front-end is what users see (UI/UX); back-end is what powers the app behind the scenes (logic, database).

165. What is responsive design?
Answer: A design approach that ensures websites look and work well on all screen sizes, from mobile to desktop.

166. What is an API key?
Answer: It’s a unique identifier used to authenticate and control access to APIs.

167. What is version control and why is it important?
Answer: It helps manage code changes. Tools like Git prevent conflicts and allow collaboration across teams.

168. What is the difference between Git and GitHub?
Answer: Git is a version control tool. GitHub is a platform to host and manage Git repositories online.

169. What is the purpose of a resume headline?
Answer: It gives a quick summary of your skills or goals. It should grab attention and reflect your value.

170. What is the STAR method in interviews?
Answer: STAR stands for Situation, Task, Action, Result — a structured way to answer behavioral questions.

171. Describe a time you worked on a tight deadline.
Answer: During my internship, I had to finish documentation and demo in 3 days. I planned my time well and stayed focused to meet the goal.

172. What is an algorithm to detect a loop in a linked list?
Answer: Floyd’s cycle detection algorithm using slow and fast pointers.

173. What is time complexity of quicksort?
Answer: Average: O(n log n), Worst: O(n²).

174. Difference between BFS and DFS?
Answer: BFS explores level by level using queue; DFS goes deep using stack or recursion.

175. What is the use of priority queue?
Answer: It allows access to the highest (or lowest) priority element quickly, used in scheduling and graphs.

176. What is the difference between pass by value and pass by reference in C++?
Answer: Value creates a copy; reference uses the original variable.

177. How would you design a login system?
Answer: It would have username/password input, hashing for password storage, validation, session handling, and error handling.

178. How do you stay organized during coding or debugging?
Answer: I break down problems, comment code, use meaningful variable names, and track bugs using a log or sticky notes.

179. Explain the importance of clean code.
Answer: Clean code is readable, maintainable, and reduces bugs. It helps other developers understand and modify it easily.

180. What are inline functions in C++?
Answer: Functions expanded during compilation to reduce function call overhead.

181. What is memory leakage?
Answer: When memory is allocated but not released, causing system slowdown or crash.

182. What is the difference between malloc() and calloc()?
Answer: malloc allocates memory without initializing, calloc allocates and initializes memory to zero.

183. What is a function pointer in C?
Answer: It allows functions to be passed as arguments or stored in arrays, useful for callbacks.

184. What is polymorphism in real life?
Answer: Like a phone — it can be used as a camera, music player, etc. One device, many behaviors.

185. What is the difference between class and object?
Answer: Class is a blueprint; object is the instance of that blueprint.

186. How do you keep your code secure?
Answer: Input validation, avoiding hardcoded credentials, using secure libraries, and regular code reviews.

187. What is an anonymous function?
Answer: A function without a name, often used for short, throwaway tasks (like lambda in Python).

188. What is a dangling pointer?
Answer: A pointer pointing to a memory location that has been freed/deleted.

189. What is a macro vs inline function?
Answer: Macros are preprocessor instructions; inline functions are type-safe and evaluated by compiler.

190. Explain real-world use case of stack.
Answer: Undo functionality in editors — last action is undone first.

191. What is difference between array and hashmap?
Answer: Arrays use index; hashmaps use key-value pairs for faster lookup.

192. What is hashing?
Answer: It’s converting data into a fixed-size value, used for fast data retrieval.

193. What is load factor in hashing?
Answer: It indicates how full a hash table is. A higher load factor can affect performance.

194. What is a circular queue?
Answer: A queue where the last element connects to the first, forming a circle — efficient use of space.

195. What is the difference between GET and POST methods in HTML forms?
Answer: GET appends data to the URL; POST sends it securely in the request body.

196. What are cookies and sessions?
Answer: Cookies store data on the client; sessions store it on the server for user tracking.

197. What is the use of final in Java?
Answer: Prevents inheritance (class), overriding (method), or reassignment (variable).

198. What is event bubbling in JavaScript?
Answer: Events propagate from the target element up through its ancestors.

199. Explain MVC architecture.
Answer: Model-View-Controller separates app logic (Model), UI (View), and control flow (Controller).

200. Why should we hire you over other candidates?
Answer: I bring strong fundamentals, a learning mindset, and commitment. I believe I’ll add long-term value to your team.

201. What is the difference between public, private, and protected access specifiers in C++?
Answer:

  • public: accessible from anywhere

  • private: accessible only within the class

  • protected: accessible within the class and its derived classes

202. What is encapsulation? Give an example.
Answer: Binding data and methods into a single unit. Example: A class with private variables and public methods.

203. What are pure virtual functions in C++?
Answer: Functions declared in base class but defined in derived class. Used for abstract classes.

204. Explain method overloading and overriding.
Answer:

  • Overloading: same method name, different parameters (compile-time)

  • Overriding: same method in base and derived class (runtime)

205. What is object slicing in C++?
Answer: When a derived class object is assigned to a base class object, extra attributes are lost.

206. Define garbage collection in Java.
Answer: Automatic memory management — frees memory of unused objects.

207. What are checked and unchecked exceptions in Java?
Answer:

  • Checked: handled at compile time (IOException)

  • Unchecked: handled at runtime (NullPointerException)

208. What is a constructor?
Answer: A special method called automatically when an object is created, used to initialize objects.

209. What is the difference between static and dynamic binding?
Answer:

  • Static: at compile time (overloading)

  • Dynamic: at runtime (overriding)

210. What is a thread? How is it useful?
Answer: A lightweight process for parallel execution. Improves performance in multi-tasking apps.

211. What is the use of the this keyword in Java?
Answer: Refers to the current object of the class.

212. What is inheritance?
Answer: Mechanism where a class acquires properties/methods of another. Promotes reusability.

213. What is an interface in Java?
Answer: A reference type containing abstract methods that must be implemented by a class.

214. Difference between ArrayList and LinkedList in Java?
Answer:

  • ArrayList: faster access, slower insertion

  • LinkedList: slower access, faster insertion/removal

215. What is the JVM?
Answer: Java Virtual Machine — runs Java bytecode and makes Java platform-independent.

216. What is recursion? Give an example.
Answer: A function calling itself.
Example: Factorial calculation using recursion.

217. What is backtracking?
Answer: A recursive algorithmic technique to find solutions by trying and discarding.

218. What is a base case in recursion?
Answer: A condition where the recursion ends to prevent infinite calls.

219. Difference between iterative and recursive solutions?
Answer:

  • Iterative: uses loops, more memory-efficient

  • Recursive: uses function calls, easier to write in some cases

220. Write a recursive code to calculate Fibonacci number.

def fib(n):

    return n if n <= 1 else fib(n-1) + fib(n-2)

 

221. What is the use of the finally block in exception handling?
Answer: It always executes, even if an exception is thrown, to close resources.

222. What is a deadlock in operating systems?
Answer: A situation where processes wait for each other, preventing further execution.

223. What is the difference between process and thread?
Answer: Process: independent, more memory. Thread: lightweight, shares memory.

224. Explain context switching.
Answer: CPU switching from one task/process/thread to another.

225. What is a semaphore?
Answer: A variable used to control access to resources in concurrent systems.

226. What is paging in OS?
Answer: Memory management that loads parts of programs into physical memory.

227. What is cache memory?
Answer: High-speed memory between RAM and CPU, stores frequently used data.

228. Difference between RAM and ROM?
Answer:

  • RAM: volatile, temporary memory

  • ROM: non-volatile, stores firmware

229. What is DNS?
Answer: Domain Name System — translates domain names to IP addresses.

230. What is HTTP and HTTPS?
Answer:

  • HTTP: unsecured protocol

  • HTTPS: secured using SSL/TLS

231. What is latency?
Answer: Delay before a transfer of data begins after an instruction.

232. What is the OSI model?
Answer: A 7-layer model that standardizes network communication (e.g., Transport, Network layers).

233. What is an IP address?
Answer: A unique number assigned to each device on a network.

234. What is the difference between TCP and UDP?
Answer:

  • TCP: connection-oriented, reliable

  • UDP: connectionless, faster, less reliable

235. What is DNS spoofing?
Answer: A cyber attack where attackers redirect traffic by corrupting DNS data.

236. What is HTTPS used for?
Answer: Secured communication on websites using SSL encryption.

237. What is two-factor authentication?
Answer: A security process requiring two separate forms of identification.

238. What is phishing?
Answer: Fraudulent attempts to obtain sensitive info via fake emails or websites.

239. How would you secure a login system?
Answer: Use password hashing, input validation, 2FA, rate-limiting, and HTTPS.

240. What are common vulnerabilities in web apps?
Answer: SQL injection, XSS, CSRF, broken authentication.

241. What is the difference between encryption and hashing?
Answer:

  • Encryption: reversible, used to protect data

  • Hashing: one-way, used for data integrity

242. What is data abstraction?
Answer: Hiding internal details and showing only essential features.

243. What is SDLC?
Answer: Software Development Life Cycle — planning, development, testing, deployment, and maintenance.

244. Why is teamwork important in software projects?
Answer: It ensures collaboration, faster delivery, better quality, and learning from each other.

245. How do you handle conflict with a teammate?
Answer: Open communication, listening actively, and finding a mutual solution respectfully.

246. Why do you want to join a service-based company?
Answer: For the structured learning, wide project exposure, and the opportunity to work with different clients.

247. What is your strength?
Answer: Adaptability and quick learning — I can adjust to new tools, roles, and challenges easily.

248. What is your weakness?
Answer: I used to hesitate asking questions, but now I’ve learned the importance of clarity and communication.

249. Where do you see yourself in 5 years?
Answer: In a technical leadership role, contributing to meaningful projects, and mentoring juniors.

250. Do you have any questions for us?
Answer: Yes. What technologies or projects would I get to work on if selected?