150+ General Technical Interview Questions and Answers for Freshers
150 Technical Interview FAQs • 25 Coding Interview Questions • 15 Project-Based Interview Questions
Prepare for campus placements, off-campus interviews and entry-level IT jobs with this guide for B.Tech, B.E., BCA, MCA and B.Sc. Computer Science graduates. Revise core concepts, coding problems and practical project questions.
1. Computer Fundamentals
1. What is a computer?
An electronic device that accepts input, processes data, stores information and produces output.
2. What is the difference between hardware and software?
Hardware consists of physical components; software consists of programs and instructions.
3. What is the difference between RAM and ROM?
RAM is generally volatile working memory; ROM retains information without power.
4. What is a CPU?
The Central Processing Unit executes instructions and performs calculations.
5. What is cache memory?
Small, fast memory that stores frequently accessed data and instructions.
6. What is the difference between 32-bit and 64-bit systems?
64-bit systems support a larger address space and generally larger native integer values.
7. What is firmware?
Software stored in non-volatile memory that controls hardware functionality.
8. What is the difference between system and application software?
System software manages resources; application software performs user-oriented tasks.
2. Programming Fundamentals
9. What is programming?
Designing and writing instructions to perform tasks.
10. What is an algorithm?
A finite sequence of well-defined steps to solve a problem.
11. What is a flowchart?
A graphical representation of a process using standard symbols.
12. What is the difference between a compiler and an interpreter?
A compiler translates code into another form; an interpreter evaluates instructions at runtime. Modern environments may combine both.
13. What is a variable?
A named storage location or binding that holds a value.
14. What is a data type?
A classification of values and their permitted operations.
15. What are syntax, runtime and logical errors?
Syntax errors violate language rules; runtime errors occur during execution; logical errors produce incorrect results.
16. What is a function?
A reusable block of code performing a specific task.
17. What is recursion?
A function calling itself on smaller problems until a base condition is reached.
18. What is an infinite loop?
A loop that continues indefinitely unless interrupted.
19. What is debugging?
Identifying, analyzing and correcting program errors.
20. What is exception handling?
Managing exceptional conditions during execution in a controlled manner.
3. Object-Oriented Programming (OOP)
21. What is OOP?
A paradigm organizing software around objects containing data and behavior.
22. What are the four pillars of OOP?
Encapsulation bundles data and behavior and controls access; abstraction hides complexity; inheritance acquires behavior from existing classes; polymorphism supports different implementations through a common interface.
23. What is the difference between a class and an object?
A class is a blueprint; an object is an instance of a class.
24. What is a constructor?
A mechanism used to initialize an object.
25. What is method overloading?
Methods with the same name but different parameter lists in languages supporting it, such as Java.
26. What is method overriding?
A subclass provides its own implementation of an inherited method.
27. What is the difference between abstraction and encapsulation?
Abstraction hides complexity; encapsulation bundles state and behavior and controls access.
28. What is the difference between an abstract class and an interface?
In Java, abstract classes may contain instance state and constructors; interfaces define contracts and may provide default methods.
29. What is a static member?
A member belonging to a class rather than an individual object.
30. What are access modifiers?
Keywords controlling accessibility, such as public, private and protected.
4. Data Structures and Algorithms
31. What is a data structure?
A way to organize and store data for efficient access and modification.
32. What are the types of data structures?
Linear structures include arrays, linked lists, stacks and queues. Non-linear structures include trees and graphs.
33. What is the difference between an array and a linked list?
Arrays typically use contiguous memory and indexed access; linked lists use connected nodes and positional traversal.
34. What is a stack?
A Last In, First Out (LIFO) data structure.
35. What is a queue?
A First In, First Out (FIFO) data structure.
36. What is a tree?
A hierarchical structure of nodes connected by edges.
37. What is a graph?
A collection of vertices and edges representing relationships.
38. What is hashing?
Mapping keys to hash values to support efficient storage and retrieval.
39. What is time complexity?
How algorithm running time grows with input size.
40. What is space complexity?
How algorithm memory requirements grow with input size.
41. What is Big O notation?
An asymptotic upper bound on the growth of a function, commonly used for time or space complexity.
42. What is the difference between linear and binary search?
Linear search checks sequentially in O(n) time; binary search halves a sorted indexed search range in O(log n) time.
43. What are common sorting algorithms?
Bubble, selection, insertion, merge, quick and heap sort.
44. What is the difference between BFS and DFS?
BFS explores level by level using a queue; DFS explores branches using a stack or recursion.
45. What is dynamic programming?
Solving overlapping subproblems and reusing their results.
5. DBMS and SQL
46. What is a database?
An organized collection of data.
47. What is a DBMS?
Software for creating, managing and accessing databases.
48. What is an RDBMS?
A database management system based on relational tables, such as MySQL or PostgreSQL.
49. What is SQL?
Structured Query Language, used to define, query and manipulate relational data.
50. What is a primary key?
A key uniquely identifying each row and disallowing NULL values.
51. What is a foreign key?
A column or set of columns referencing a key and maintaining referential integrity.
52. What is a candidate key?
A minimal set of attributes uniquely identifying a record.
53. What is normalization?
Organizing tables to reduce redundancy and modification anomalies.
54. What are the types of SQL commands?
DDL: CREATE, ALTER, DROP; DML: INSERT, UPDATE, DELETE; DQL: SELECT; DCL: GRANT, REVOKE; TCL: COMMIT, ROLLBACK.
55. What is a JOIN?
An operation combining records based on specified conditions.
56. What are the types of JOINs?
INNER JOIN returns matches; LEFT and RIGHT JOIN preserve all rows from the respective side; FULL OUTER JOIN preserves rows from both sides.
57. What is the difference between WHERE and HAVING?
WHERE filters rows before grouping; HAVING filters groups after aggregation.
58. What is the difference between DELETE, TRUNCATE and DROP?
DELETE removes selected or all rows; TRUNCATE removes all rows; DROP removes the table itself.
59. What is an index?
A structure improving retrieval performance at the cost of storage and write overhead.
60. What are ACID properties?
Atomicity, Consistency, Isolation and Durability ensure reliable transaction behavior.
61. What is a transaction?
A logical unit of database operations treated as one operation.
62. What is a view?
A virtual table defined by a query.
63. What is the difference between SQL and NoSQL databases?
Relational databases use tables; NoSQL databases use alternative models such as documents, graphs or key-value pairs.
64. What is NULL?
A marker for missing or unknown information.
65. How do you find the second-highest distinct salary?
SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);
6. Operating Systems
66. What is an operating system?
System software managing hardware, resources and application execution.
67. What are the functions of an OS?
Process, memory, file, device and security management.
68. What is the difference between a program and a process?
A program is a collection of instructions; a process is an executing instance.
69. What is a thread?
A unit of execution within a process.
70. What is the difference between a process and a thread?
Processes generally have separate address spaces; threads share their process address space.
71. What is multitasking?
Managing multiple tasks concurrently.
72. What is multithreading?
Executing multiple threads concurrently or in parallel.
73. What is deadlock?
A condition where participants wait indefinitely for resources held by one another.
74. What are the four necessary conditions for deadlock?
Mutual exclusion, hold and wait, no preemption and circular wait.
75. What is virtual memory?
A mechanism providing virtual address spaces, potentially using secondary storage to supplement RAM.
76. What is paging?
Dividing virtual memory into fixed-size pages and physical memory into frames.
77. What is CPU scheduling?
Selecting the next ready process or thread to execute.
7. Computer Networks
78. What is a computer network?
Interconnected devices communicating and sharing resources.
79. What is the difference between LAN, MAN and WAN?
LAN covers a local area; MAN covers a metropolitan area; WAN covers large geographical areas.
80. What is an IP address?
A logical network interface address used for IP communication.
81. What is a MAC address?
A data-link-layer identifier used for local network communication.
82. What is the OSI model?
A seven-layer reference model: Physical, Data Link, Network, Transport, Session, Presentation and Application.
83. What is the difference between TCP and UDP?
TCP provides reliable ordered delivery; UDP is connectionless and does not guarantee delivery or ordering.
84. What is DNS?
Domain Name System, which resolves domain names to IP addresses and other records.
85. What is HTTP?
Hypertext Transfer Protocol, used to exchange resources between clients and servers.
86. What is HTTPS?
HTTP protected by TLS encryption, integrity protection and server authentication.
87. What is a firewall?
A system controlling network traffic according to security rules.
88. What is a router?
A device forwarding packets between networks.
89. What is the difference between the Internet and the Web?
The Internet is network infrastructure; the Web is a service running over it.
8. Web Development and APIs
90. What is frontend development?
Developing user-facing interfaces and interactions.
91. What is backend development?
Developing server-side logic, database operations and APIs.
92. What is full-stack development?
Developing both frontend and backend components.
93. What is client-server architecture?
Clients request services and servers process requests and return responses.
94. What is an API?
An Application Programming Interface defines how software components communicate.
95. What is a REST API?
An API following REST architectural principles, commonly using HTTP resources.
96. What are common HTTP methods?
GET retrieves; POST submits or creates; PUT replaces; PATCH partially updates; DELETE removes resources.
97. What are common HTTP status codes?
200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Internal Server Error, 503 Service Unavailable.
98. What is JSON?
JavaScript Object Notation, a text-based data interchange format.
99. What is the difference between authentication and authorization?
Authentication verifies identity; authorization determines permissions.
100. What is the difference between cookies and sessions?
Cookies store data in the browser; sessions commonly store state on the server using a session identifier.
101. What is JWT?
JSON Web Token, a compact format for claims that can be signed or encrypted.
102. What is responsive web design?
Designing websites that adapt to different screens and devices.
9. Software Engineering and Testing
103. What is software engineering?
Applying engineering principles to software development and maintenance.
104. What is SDLC?
Software Development Life Cycle: requirements, design, development, testing, deployment and maintenance.
105. What is the Waterfall model?
A sequential development approach progressing through defined phases.
106. What is Agile?
An iterative approach emphasizing collaboration, frequent delivery and adaptation.
107. What is Scrum?
An Agile framework using time-boxed iterations called sprints.
108. What is software testing?
Evaluating software to identify defects and verify requirements.
109. What is unit testing?
Testing individual functions or components independently.
110. What is integration testing?
Testing interactions between components.
111. What is black-box versus white-box testing?
Black-box testing evaluates external behavior; white-box testing examines internal logic and execution paths.
112. What is regression testing?
Checking that existing functionality still works after changes.
113. What is verification versus validation?
Verification checks conformance to specifications; validation checks satisfaction of user needs.
10. Git, GitHub and DevOps
114. What is version control?
Tracking file changes to support collaboration and recovery.
115. What is Git?
A distributed version control system.
116. What is the difference between Git and GitHub?
Git tracks changes; GitHub hosts repositories and supports collaboration.
117. What are common Git commands?
git init, clone, add, commit, push, pull, status, branch and merge.
118. What is a merge conflict?
A situation where Git cannot automatically reconcile competing changes.
119. What is DevOps?
Practices and tools improving collaboration between development and operations.
120. What is CI/CD?
Continuous Integration and Continuous Delivery or Deployment automate integration, testing and release stages.
121. What is Docker?
A platform for building and running containerized applications.
122. What is the difference between containers and virtual machines?
Containers generally share a host kernel; virtual machines run separate guest operating systems.
11. Cloud Computing
123. What is cloud computing?
On-demand delivery of computing resources over a network.
124. What are cloud service models?
IaaS provides infrastructure; PaaS provides managed application platforms; SaaS provides ready-to-use software.
125. What are cloud deployment models?
Public, private, hybrid and community cloud.
126. What is scalability?
The ability to handle increasing workloads by adding or improving resources.
127. What is load balancing?
Distributing workloads across computing resources.
128. What is serverless computing?
A model where the provider manages underlying server infrastructure.
129. What are popular cloud platforms?
AWS, Microsoft Azure and Google Cloud Platform.
12. Cybersecurity Fundamentals
130. What is cybersecurity?
Protecting systems, networks, applications and data from attacks and unauthorized access.
131. What is encryption?
Converting readable data into encoded form recoverable with an appropriate key.
132. What is encryption versus hashing?
Encryption is reversible with a key; cryptographic hashing is designed to be difficult to reverse.
133. What is phishing?
Social engineering that tricks users into revealing information or taking harmful actions.
134. What is malware?
Malicious software designed to damage, disrupt or exploit systems.
135. What is SQL injection?
A vulnerability where untrusted input alters SQL behavior. Use parameterized queries to prevent it.
136. What is XSS?
Cross-Site Scripting allows malicious scripts to execute in another user's browser.
137. What is two-factor authentication?
Verifying identity using two different categories of authentication factors.
13. AI and Emerging Technologies
138. What is Artificial Intelligence?
Computing systems performing tasks typically requiring human intelligence.
139. What is Machine Learning?
A subset of AI that learns patterns from data to make predictions or decisions.
140. What is the difference between AI, ML and Deep Learning?
AI is the broad field; ML is a subset of AI; deep learning is a subset of ML using multilayer neural networks.
141. What are the types of Machine Learning?
Supervised, unsupervised, semi-supervised and reinforcement learning.
142. What is Generative AI?
AI capable of generating content such as text, images, audio, video and code.
143. What is an LLM?
A Large Language Model trained on extensive data to process and generate language.
144. What is prompt engineering?
Designing and refining instructions to obtain useful AI outputs.
145. What is Agentic AI?
AI systems that pursue goals, plan actions and use tools with varying autonomy.
146. What is Big Data?
Data whose scale, speed or complexity requires specialized processing approaches.
147. What is IoT?
Connected physical devices with sensors and software that collect and exchange data.
148. What is blockchain?
A shared ledger using cryptographically linked blocks and agreement mechanisms.
149. What is data analytics?
Examining data to discover patterns and support decisions.
150. What is traditional programming versus ML?
Traditional programming uses explicitly defined rules; ML learns patterns from training data.
14. Coding Interview Questions
| No. | Coding problem | Concept |
|---|---|---|
| 1 | Reverse a string | Strings |
| 2 | Reverse a number | Loops |
| 3 | Check prime number | Logic |
| 4 | Check palindrome | Strings |
| 5 | Find factorial | Recursion |
| 6 | Generate Fibonacci series | Iteration |
| 7 | Check Armstrong number | Arithmetic |
| 8 | Largest of three numbers | Conditions |
| 9 | Swap without temporary variable | Operators |
| 10 | Count vowels and consonants | Strings |
| 11 | Sum of digits | Loops |
| 12 | Second-largest array element | Arrays |
| 13 | Remove duplicates | Sets |
| 14 | Find missing number from 1 to N | Arrays |
| 15 | Character frequency | Hashing |
| 16 | Check anagrams | Strings |
| 17 | Linear search | Searching |
| 18 | Binary search | Searching |
| 19 | Bubble sort | Sorting |
| 20 | Merge sorted arrays | Arrays |
| 21 | Move zeros to end | Arrays |
| 22 | Two sum | Hashing |
| 23 | Balanced parentheses | Stack |
| 24 | Reverse linked list | Linked lists |
| 25 | Maximum subarray sum | Algorithms |
15. Project-Based Interview Questions
| No. | Question | Expected answer focus |
|---|---|---|
| 1 | Explain your project | Problem, solution and outcome |
| 2 | Why did you choose it? | Motivation and relevance |
| 3 | What technologies did you use? | Technology stack |
| 4 | Why those technologies? | Technical justification |
| 5 | What was your role? | Individual contribution |
| 6 | Explain the architecture | Components and data flow |
| 7 | Which database and why? | Database selection |
| 8 | What challenges did you face? | Problem solving |
| 9 | How did you test it? | Testing |
| 10 | How did you secure it? | Authentication and security |
| 11 | How did you deploy it? | Deployment |
| 12 | Did you use Git and GitHub? | Version control |
| 13 | How did you use AI tools? | Responsible AI usage |
| 14 | How would you improve it? | Future enhancements |
| 15 | Can it handle thousands of users? | Scalability |
16. Scenario-Based Technical Interview Questions
1. Your application is slow. What would you do?
Check logs, CPU and memory, database queries and network requests; profile the application.
2. Your program produces incorrect output. What would you do?
Reproduce the issue, verify inputs, trace logic, debug and test the fix.
3. How would you store passwords securely?
Use Argon2id or bcrypt with unique salts; never store plaintext passwords.
4. What happens when you enter a URL?
The browser resolves the domain, establishes a connection, negotiates TLS for HTTPS, sends a request and renders the response.
5. How would you prevent duplicate registrations?
Use database unique constraints and backend validation.
6. What if the database stops responding?
Check connectivity, logs, server resources and configuration; handle failures gracefully.
7. How would you handle thousands of users?
Analyze workload and consider caching, load balancing, database optimization and horizontal scaling.
8. How would you learn an unfamiliar technology?
Study official documentation, build a prototype, seek guidance and apply it to the task.
9. How would you verify AI-generated code?
Review logic and dependencies, run tests, check security and confirm requirements.
10. What if you do not know an interview answer?
Acknowledge the gap, explain related knowledge and describe how you would learn or solve the problem.
17. Technical Interview Preparation Checklist
- Master one programming language
- Understand OOP with examples
- Practice DSA
- Practice SQL and DBMS
- Revise operating systems
- Understand networking
- Learn web development and APIs
- Understand software testing
- Practice Git and GitHub
- Learn cloud fundamentals
- Learn cybersecurity
- Understand AI, ML and Generative AI
- Prepare project explanations
- Practice scenario questions
- Attend mock interviews
Recommended Preparation Priority
Very high: Programming, OOP, DSA, DBMS and SQL, academic projects.
High: Operating systems, networks, web development, testing, Git, AI and emerging technologies.
Medium: Cloud, cybersecurity and DevOps. Priorities vary by job role.
Final Advice for Freshers
Do not simply memorize answers. Understand concepts, practice implementation, prepare real-world examples and explain technical ideas in simple English. Employers generally value strong fundamentals, logical thinking, problem-solving skills, practical knowledge and willingness to learn.