Computer Science & Engineering (CSE) Interview Questions & Answers | EngineerX

Computer Science & Engineering (CSE) Interview Questions & Answers — commonly asked B.Tech / campus placement interview questions with clear, practical answers. Tap any question to open its answer.

Showing the first 50 questions free. The complete 250-question bank is available as a PDF below.

Computer Science & Engineering (CSE) — Q1 to Q50

Q1You have completed B.Tech in Computer Science and Engineering. How would you explain your technical strengths to an interviewer?
AnswerMy strengths are programming fundamentals, problem-solving, databases, operating systems and understanding of software development concepts. I am also comfortable learning new technologies and debugging problems systematically.
Q2A program works correctly for small inputs but becomes extremely slow for large inputs. How would you investigate it?
AnswerI would analyze the algorithm's time and space complexity and identify the section consuming most execution time. I would then look for inefficient loops, unnecessary database operations or repeated computations and optimize them.
Q3Your application suddenly starts consuming excessive CPU. What would you check first?
AnswerI would identify the process or service causing high CPU usage and inspect logs, threads and recent code changes. Infinite loops, inefficient algorithms, excessive requests or thread-related problems could be possible causes.
Q4A program crashes with a segmentation fault. How would you troubleshoot it?
AnswerI would inspect the code for invalid memory access, null or dangling pointers and array-bound violations. I would use debugging tools and examine the exact line where the crash occurs to identify the root cause.
Q5A program produces the correct output for most inputs but fails for certain edge cases. How would you approach it?
AnswerI would reproduce the failure using the smallest possible input and compare it with the expected behavior. Then I would inspect boundary conditions, input validation and assumptions in the algorithm.
Q6How would you debug a program that gives incorrect output without producing any error?
AnswerI would verify the input, intermediate values and final output step by step using debugging or logging. I would isolate the smallest section where the actual result differs from the expected result.
Q7A Python application suddenly becomes slow after processing thousands of records. What would you investigate?
AnswerI would check algorithm complexity, memory usage, database queries and repeated operations inside loops. Profiling the application can help identify the exact function or operation responsible for the slowdown.
Q8Two developers have written different solutions for the same programming problem. How would you decide which one is better?
AnswerI would compare correctness, time complexity, memory usage, readability, maintainability and scalability. The shortest code is not necessarily the best solution if it is difficult to maintain or performs poorly.
Q9An application gives a “file not found” error even though the file exists. What would you check?
AnswerI would verify the file path, working directory, filename case, permissions and whether the application is running under a different user or environment. I would also check whether the application expects an absolute or relative path.
Q10Your code works on your computer but fails on another system. What would you investigate?
AnswerI would compare operating-system settings, runtime versions, dependencies, environment variables, configuration and file paths. Differences in the software environment are a common reason for this type of problem.
Q11A database query takes several seconds to execute even though the table is not extremely large. How would you troubleshoot it?
AnswerI would examine the query execution plan and check indexes, joins, filtering conditions and unnecessary data retrieval. I would optimize the query and add or modify indexes only after understanding the actual bottleneck.
Q12A SQL query returns duplicate records unexpectedly. What would you investigate?
AnswerI would inspect the JOIN conditions and determine whether one record from one table is matching multiple records in another table. I would also check whether DISTINCT or aggregation is actually appropriate for the required result.
Q13A database application works correctly but suddenly starts returning timeout errors. What would you check?
AnswerI would check database load, connection availability, slow queries, locks, network latency and recent application changes. Database and application logs can help determine whether the timeout originates from the query, connection or network.
Q14A user accidentally deletes important database records. What would you do?
AnswerI would immediately stop further destructive operations and preserve the available evidence. Depending on the organization's recovery procedure, I would use backups, transaction logs or other approved recovery mechanisms to restore the data.
Q15A SQL query becomes slow after the database grows significantly. What would you consider?
AnswerI would review indexing, query execution plans, table statistics and whether the query scans more data than necessary. Database design and query optimization may need to be revisited as data volume increases.
Q16An application cannot connect to the database, but the database server is running. How would you troubleshoot it?
AnswerI would check the connection string, hostname, port, credentials, firewall rules and database service availability. I would also test connectivity from the application's actual server rather than assuming the network path is working.
Q17Why might an application use a database connection pool instead of creating a new connection for every request?
AnswerCreating database connections repeatedly can add significant overhead. A connection pool reuses established connections, reducing connection-creation time and improving application performance under multiple requests.
Q18A database server shows many active connections and new users cannot connect. What would you investigate?
AnswerI would check the configured connection limit and identify whether connections are being leaked or held unnecessarily. Application connection-pool settings and long-running queries should also be reviewed.
Q19A web application returns HTTP 500 errors intermittently. How would you investigate it?
AnswerI would inspect application and server logs around the exact failure time and identify the affected endpoint. I would then reproduce the request and check database failures, unhandled exceptions, resource limits and recent deployments.
Q20An API works correctly in testing but returns errors after deployment. What would you check?
AnswerI would compare production configuration, environment variables, dependencies, database connectivity and external-service access with the testing environment. Deployment logs and API logs can help identify the difference.
Q21A REST API response suddenly becomes very slow. How would you find the bottleneck?
AnswerI would measure the time spent in request processing, database queries, external API calls and serialization. Monitoring and profiling can identify which component contributes most to the response time.
Q22An API returns HTTP 404 for a URL that appears correct. What would you check?
AnswerI would verify the route definition, HTTP method, URL parameters, deployment configuration and API gateway or reverse-proxy routing. I would also confirm that the requested resource actually exists.
Q23An API returns HTTP 401 even though the user has logged in. What would you investigate?
AnswerI would check authentication-token generation, expiration, headers and server-side token validation. I would also verify that the client is sending the token in the expected format.
Q24An API returns HTTP 403 after successful authentication. What does this suggest?
AnswerIt generally indicates that the user is authenticated but does not have sufficient permission for the requested operation. I would check authorization rules, roles, permissions and access-control configuration.
Q25A web page loads correctly but some images and JavaScript files do not load. What would you check?
AnswerI would inspect browser developer tools for failed network requests and verify the resource URLs and server responses. I would also check static-file configuration, permissions, caching and content-delivery settings.
Q26A website works on desktop but has layout problems on mobile devices. How would you troubleshoot it?
AnswerI would inspect responsive CSS, viewport configuration, media queries and fixed-width elements. I would test multiple screen sizes and use browser developer tools to identify which element causes the layout problem.
Q27A user reports that a web application logs them out unexpectedly. What would you investigate?
AnswerI would check session expiration, cookie settings, authentication-token lifetime and server-side session storage. I would also investigate whether multiple servers are handling requests without proper session sharing.
Q28A login system allows valid users to authenticate but rejects some users unexpectedly. What would you check?
AnswerI would verify credential handling, account status, password hashing, database records and authentication logic. I would also check whether input formatting, case sensitivity or account-lockout rules are affecting specific users.
Q29Why should passwords generally not be stored as plain text in a database?
AnswerPlain-text passwords expose users directly if the database is compromised. Passwords should be stored using an appropriate password-hashing mechanism with proper salting and secure configuration.
Q30A developer accidentally commits a password or API key into a source-code repository. What should happen next?
AnswerThe exposed credential should be treated as compromised and revoked or rotated immediately. The repository history should also be handled according to the organization's security procedure, and the secret should be moved to secure configuration management.
Q31A Git merge produces conflicts in an important source file. How would you resolve them?
AnswerI would inspect both versions and understand the intended changes before manually resolving the conflicting sections. After resolving the conflict, I would run tests and review the final diff before committing the result.
Q32Your latest code change breaks functionality that previously worked. What would you do?
AnswerI would reproduce the issue and identify which change introduced the regression. Depending on the situation, I would fix the code or safely revert the change and then add appropriate testing to prevent recurrence.
Q33Why is version control important in software development?
AnswerVersion control maintains a history of code changes and enables collaboration between developers. It also makes it easier to review changes, investigate problems and safely return to an earlier version.
Q34A software project has many unresolved bugs and development is falling behind schedule. How would you prioritize the bugs?
AnswerI would prioritize issues based on severity, security impact, number of affected users and business or operational impact. Critical failures and security vulnerabilities should generally receive higher priority than minor cosmetic issues.
Q35A software application consumes increasing amounts of memory over time. What would you investigate?
AnswerI would look for memory leaks, objects that are not being released, growing caches and uncontrolled data structures. Memory profiling and long-running tests can help identify the source.
Q36A multithreaded application occasionally produces incorrect results, but the problem is difficult to reproduce. What could be happening?
AnswerA race condition or improper synchronization could cause threads to access shared data in an unsafe order. I would examine shared resources, locking mechanisms and thread execution and use concurrency debugging techniques.
Q37Two processes need to access the same shared resource. How would you prevent data corruption?
AnswerI would use an appropriate synchronization mechanism such as locks, semaphores, transactions or another controlled coordination method. The choice depends on whether the resource is in memory, a file, a database or another shared system.
Q38A multithreaded application suddenly stops responding. What would you investigate?
AnswerI would check for deadlocks, blocked threads, resource starvation and synchronization problems. Thread dumps and runtime diagnostics can help identify which threads are waiting and what resources they require.
Q39A Linux server is running out of disk space. How would you investigate it?
AnswerI would identify which filesystem and directories are consuming the most space and inspect large files, logs, temporary files and application data. I would clean or archive data only according to the system's retention and operational requirements.
Q40A Linux service is not running after a server reboot. What would you check?
AnswerI would check the service status, startup configuration, logs and dependencies. I would determine whether the service failed to start automatically or started and then stopped because of a configuration or dependency problem.
Q41A server responds slowly even though CPU utilization is low. What would you investigate?
AnswerI would check memory usage, disk I/O, network latency, database performance and process-level bottlenecks. Low CPU utilization does not necessarily mean the system has no performance bottleneck.
Q42A computer becomes extremely slow when many applications are opened. What would you check?
AnswerI would monitor RAM, CPU, disk activity and background processes. If memory is insufficient, excessive swapping or paging can significantly reduce system performance.
Q43A user cannot access a shared network folder while other users can. How would you troubleshoot it?
AnswerI would check the user's network connectivity, account permissions, group membership and authentication status. I would also compare the user's access configuration with a working user.
Q44A server cannot communicate with another server on the same network. What would you check?
AnswerI would verify IP configuration, routing, firewall rules, DNS resolution and service availability. I would use basic network diagnostics to determine whether the failure occurs at the network or application level.
Q45A website is reachable by IP address but not by domain name. What would you investigate?
AnswerI would check DNS records, DNS resolution, nameserver configuration and local DNS caching. If the server is reachable by IP, the issue may be related to name resolution rather than the web server itself.
Q46A network connection drops intermittently. How would you troubleshoot it?
AnswerI would check physical connections, signal quality, network-device logs, packet loss and latency over time. I would also determine whether the problem affects one device, one network segment or the entire network.
Q47A software deployment completes successfully, but users still see the old version. What could be happening?
AnswerCaching, multiple application servers, load balancers or an incomplete deployment could cause this behavior. I would verify the deployed version on each relevant server and inspect caching and routing configuration.
Q48A production application suddenly stops responding after a new release. What would you do first?
AnswerI would check monitoring, logs and the application's health status to understand the failure. If the release is confirmed as the cause and rollback is part of the approved procedure, I would restore the last known-good version while investigating the issue.
Q49How would you approach learning a new programming language required for a job?
AnswerI would first learn its syntax and core concepts and then build small practical programs. After understanding the fundamentals, I would work on a project using the language and learn the ecosystem tools required for the role.
Q50Why should we hire you as a B.Tech CSE fresher?
AnswerI have a strong foundation in programming, databases, operating systems, networking and software-development concepts. I am comfortable solving problems systematically, learning new technologies and working with a team to build reliable software.

📚 Buy Full Computer Science & Engineering (CSE) Interview Q&A PDF — ₹49

You’ve read the first 50 questions here. Get the complete 250-question bank PDF with all questions and clear answers. One-time price: ₹49.

🛒 Buy PDF – ₹49

Comments

Popular posts from this blog

Polytechnic Interview Q&A (All Branches)

ITI Interview Q&A – Mechanical/Manufacturing Trades

EV Troubleshooting - 70 Interview & Field Q&A