Mphasis .NET Full Stack Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Mphasis hiring for .NET Full Stack roles
Mphasis is an Indian IT services company, majority-owned by Blackstone, providing cloud, application, testing, data and cognitive services. It has a strong presence in banking, financial services and insurance clients. In India it hires for software engineers, test engineers, data analysts and data engineers, often for BFSI-focused projects.
For .NET Full Stack roles, this Mphasis practice set focuses most on LINQ, Collections and Generics (7), C# Fundamentals (5), Async Programming and Multithreading (5), Angular and React Front End (5). It has 18 easy, 12 medium questions, so you can start easy and work up to the harder ones.
Company type
IT services
Headquarters
Bengaluru, India
Main India offices
Bengaluru, Pune, Chennai
Mphasis .NET Full Stack interview process
Online assessment (aptitude + reasoning)
Coding test
Technical interview
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for MphasisStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
Value types such as int, double, bool, enums and structs hold their data directly, and assigning one copies the value. Reference types such as classes, arrays, strings and delegates hold a reference to an object on the managed heap, so assigning copies only the reference. Changing a copied struct does not affect the original, but changing an object through a copied reference changes what both variables see.
Constraints restrict which types can be used for a type parameter so the generic code can rely on certain members. Examples: where T : class (reference type), where T : struct, where T : new() (has a parameterless constructor), where T : BaseEntity (inherits a class), where T : IComparable<T>, and where T : notnull. A repository might use where T : class, IEntity so it can read the Id property safely.
03
Explain First, FirstOrDefault, Single and SingleOrDefault.
First returns the first match and throws if none exists. FirstOrDefault returns the default value, null for classes, if none exists. Single expects exactly one match and throws if there are zero or more than one. SingleOrDefault returns default for zero but still throws for more than one. Use Single when duplicates would indicate a data bug, such as lookup by unique PAN number; otherwise FirstOrDefault is cheaper.
An async void method cannot be awaited, so the caller does not know when it finishes. Exceptions thrown inside it cannot be caught by the caller; they go to the synchronization context and can crash the process. It is also hard to unit test. Use async Task instead. The only accepted use of async void is for event handlers, such as button click handlers in desktop apps, where the signature is fixed.
05
You must resize 10,000 images and also call an external API for 10,000 records. Which approach do you use for each task?
Parallel.ForEach is for CPU-bound work, such as resizing thousands of images, where splitting work across cores speeds things up. async/await is for I/O-bound work, where you mostly wait on networks or disks. Using Parallel.ForEach for HTTP calls wastes threads while they wait. For many concurrent I/O operations with a limit, use Parallel.ForEachAsync with MaxDegreeOfParallelism, available since .NET 6.
06
Show how to bind configuration from appsettings.json using the Options pattern.
// appsettings.json
// "Smtp": { "Host": "smtp.example.com", "Port": 587 }
public class SmtpOptions
{
public string Host { get; set; } = "";
public int Port { get; set; }
}
builder.Services.Configure<SmtpOptions>(builder.Configuration.GetSection("Smtp"));
public class EmailService(IOptions<SmtpOptions> options)
{
private readonly SmtpOptions _smtp = options.Value;
}
appsettings.{Environment}.json and environment variables override base values. Use IOptionsMonitor to pick up changes without restart.
I built an online bus-pass system (Situation) as my final project with two classmates. My task was the API and database. I designed SQL Server tables, built an ASP.NET Core Web API with EF Core and JWT login, and connected an Angular front end with reactive forms and route guards. I deployed it on Azure App Service. Result: it handled pass applications, approvals and PDF passes, and our college used it for a semester demo.
08
What is the difference between a Task and a Thread?
A Thread is an OS-level execution unit with its own stack, costly to create. A Task is a higher-level promise of work that may or may not use a thread; I/O tasks often use no thread while waiting, and CPU tasks run on pooled threads. Tasks support return values, continuations, cancellation, exceptions and composition with WhenAll. In modern .NET you almost always use Tasks rather than creating threads manually.
09
What is the difference between .NET Framework, .NET Core and modern .NET?
.NET Framework is the original Windows-only runtime, now in maintenance mode at version 4.8.1. .NET Core was the cross-platform, open-source rewrite. From .NET 5 onwards the name became just .NET, and it runs on Windows, Linux and macOS. In 2026, .NET 10 is the current LTS release. New projects should use modern .NET; Framework is kept only for legacy apps such as old Web Forms or WCF services.
The Common Language Runtime is the execution engine of .NET. It loads compiled IL code, converts it to machine code with the JIT compiler, manages memory through the garbage collector, enforces type safety, handles exceptions and manages threads. Because every .NET language compiles to the same IL, C#, F# and VB.NET code can run on the same CLR and call each other.
11
When should you use StringBuilder instead of string?
Strings in C# are immutable, so every concatenation creates a new string object and copies the old content. In a loop that appends thousands of times, this creates heavy allocations. StringBuilder keeps a resizable internal buffer and appends in place, so it is much faster for repeated changes. For two or three concatenations or interpolation in a single statement, a normal string is simpler and fine.
Any() stops as soon as it finds one element, so it is O(1) for most sources, and in EF Core it translates to an efficient SQL EXISTS. Count() may need to walk the entire sequence or run COUNT(*) on the table, which is wasteful just to check for existence. For List<T> or arrays, the Count or Length property is also fine because it is stored, but Any() expresses the intent clearly.
A delegate is a type-safe reference to a method with a specific signature, similar to a function pointer but checked by the compiler. You can pass methods as parameters, store them and call them later. Delegates can be multicast, holding several methods that run in order. Lambdas, LINQ, events and callbacks are all built on delegates, and the built-in Func and Action types cover most needs.
lock ensures that only one thread at a time executes a block of code for a given lock object, preventing race conditions on shared data. It compiles to Monitor.Enter and Monitor.Exit inside try-finally. Lock on a private readonly object, never on this or a string. Since .NET 9 there is a dedicated System.Threading.Lock type that is faster. You cannot await inside a lock; use SemaphoreSlim for async code.
Boxing converts a value type to object or an interface type by wrapping it in a heap object, for example object o = 42. Unboxing extracts the value back with an explicit cast, such as int n = (int)o. Both cost allocations and CPU time, and repeated boxing in loops increases garbage collection pressure. Generic collections like List<int> avoid boxing, which is one reason ArrayList is no longer used.
16
When would you choose an array, a List<T> or a LinkedList<T>?
An array has a fixed size and fastest index access, good when the count is known. List<T> wraps a resizable array, with O(1) index access and amortised O(1) add at the end, and is the default choice for most code. LinkedList<T> gives O(1) insert and remove at a known node but O(n) access by index and poor cache locality, so it is rarely the better option in practice.
17
Angular or React with ASP.NET Core: how do you choose?
Angular is a complete framework with routing, forms, HTTP, dependency injection and TypeScript built in, which suits large enterprise apps and teams that want strong conventions. React is a UI library with a large ecosystem, giving more freedom to pick routing and state tools, and is popular in product startups. Both work equally well with an ASP.NET Core API. Choose based on team skills, project size and the company's existing stack.
18
What is the difference between CPU-bound and I/O-bound work, and how do you handle each in .NET?
CPU-bound work keeps the processor busy, like encryption, image processing or heavy calculations; speed it up with parallelism using Parallel.For, PLINQ or Task.Run in desktop apps. I/O-bound work spends most time waiting on databases, files or networks; handle it with async/await so threads are released while waiting. Choosing wrongly wastes resources, such as using Parallel.ForEach for HTTP calls or Task.Run around database queries.
The virtual DOM is a lightweight JavaScript copy of the UI tree. When state changes, React renders a new virtual tree, compares it with the previous one in a process called reconciliation, and applies only the minimal changes to the real DOM, which is slow to update. Keys on list items help React match elements correctly. This lets developers write UI declaratively without manually updating DOM nodes.
20
You need to remove inactive users from a List<User> while looping through it with foreach, and you get an InvalidOperationException. How do you fix it?
foreach does not allow modifying the collection it is enumerating, so the enumerator throws. The simplest fix is users.RemoveAll(u => !u.IsActive), which is efficient and clear. Alternatives are looping backwards with a for loop and RemoveAt, or building a new filtered list with Where and ToList. For a dictionary, collect keys to remove first, then remove them after the loop.
21
Tell me about a disagreement with the front-end team over an API contract and how you resolved it.
On a dashboard feature (Situation) the React team wanted one endpoint returning everything, while I worried about payload size. My task was to agree a design quickly. I set up a short call, we listed exact screen needs, and I proposed one aggregated endpoint with paging and optional fields. We wrote the OpenAPI spec together. Result: payload dropped by half, the UI got one call, and the spec became our template for later features.
public async Task<PagedResult<ProductDto>> GetPageAsync(int page, int size)
{
var query = db.Products.AsNoTracking().OrderBy(p => p.Id);
int total = await query.CountAsync();
var items = await query
.Skip((page - 1) * size)
.Take(size)
.Select(p => new ProductDto(p.Id, p.Name, p.Price))
.ToListAsync();
return new PagedResult<ProductDto>(items, total, page, size);
}
Always order before Skip and Take. For very deep pages, keyset paging with Where(p => p.Id > lastId) is faster than large offsets.
23
Find the second highest salary from a list using LINQ.
int? second = employees
.Select(e => e.Salary)
.Distinct()
.OrderByDescending(s => s)
.Skip(1)
.Cast<int?>()
.FirstOrDefault();
Distinct handles ties, so if two people earn the top salary the next lower value is returned. Casting to int? makes the result null instead of 0 when fewer than two distinct salaries exist.
Every HTTP request passes through a chain of middleware components configured in Program.cs. Each component can inspect or modify the request, call the next one, and then work on the response on the way back. Order matters: exception handling first, then HTTPS redirection, static files, routing, CORS, authentication, authorization and finally endpoints. For example, putting UseAuthorization before UseAuthentication means users never appear logged in.
25
Which commands do you use to create and apply EF Core migrations?
dotnet tool install --global dotnet-ef
# create a migration from model changes
dotnet ef migrations add AddOrderStatus
# apply pending migrations to the database
dotnet ef database update
# undo the last unapplied migration
dotnet ef migrations remove
# generate an idempotent SQL script for production
dotnet ef migrations script --idempotent -o deploy.sql
In Visual Studio the Package Manager Console equivalents are Add-Migration and Update-Database.
26
What is the difference between reactive forms and template-driven forms in Angular?
Template-driven forms are defined mainly in HTML with ngModel and directives; they are quick for simple forms but harder to test. Reactive forms are defined in TypeScript with FormGroup, FormControl and Validators, giving explicit, strongly typed models, easy dynamic fields, custom and async validators, and straightforward unit testing. For enterprise apps such as loan application or KYC forms, reactive forms are the usual choice.
public class Customer
{
public string Name { get; }
public string City { get; }
public Customer(string name) : this(name, "Unknown") { }
public Customer(string name, string city)
{
Name = name;
City = city;
}
}
public class PremiumCustomer : Customer
{
public PremiumCustomer(string name) : base(name, "Delhi") { }
}
this() calls another constructor of the same class and base() calls the parent constructor, avoiding duplicated setup code.
28
Using LINQ, group employees by department and get the count and average salary.
var report = employees
.GroupBy(e => e.Department)
.Select(g => new
{
Department = g.Key,
Count = g.Count(),
AvgSalary = g.Average(e => e.Salary)
})
.OrderByDescending(x => x.AvgSalary)
.ToList();
GroupBy returns groups with a Key, and aggregate methods run per group. With EF Core this translates to SQL GROUP BY.
29
A page listing 100 orders with customer names runs 101 SQL queries. What is the problem and how do you fix it?
This is the N+1 problem: one query loads the orders, then lazy loading fires a separate query for each order's Customer. Fix it by loading everything in one query, either with Include(o => o.Customer) or better with a projection: Select(o => new OrderListDto(o.Id, o.Total, o.Customer.Name)), which fetches only needed columns via a join. Turn on EF Core logging to spot such patterns early.
30
Show the useState and useEffect hooks in a React component.
import { useState, useEffect } from 'react';
export function Timer() {
const [seconds, setSeconds] = useState(0);
useEffect(() => {
const id = setInterval(() => setSeconds(s => s + 1), 1000);
return () => clearInterval(id); // cleanup on unmount
}, []); // empty array: run once
return <p>Elapsed: {seconds}s</p>;
}
useState stores state that triggers re-render; useEffect runs side effects after render, and its dependency array controls when it re-runs.
Tips to crack the Mphasis .NET Full Stack interview
Learn BFSI basics such as banking transactions, insurance claims and mortgages, since many Mphasis clients are in this domain.
Revise testing concepts, SQL and one programming language well for technical interviews.
Read about Mphasis's Front2Back transformation approach, which the company uses to describe its service model.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Mphasis interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Mphasis .NET Full Stack interview?
Candidates usually go through 4 stages: Online assessment (aptitude + reasoning); Coding test; Technical interview; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Mphasis .NET Full Stack interview?
This practice set leans on LINQ, Collections and Generics (7), C# Fundamentals (5), Async Programming and Multithreading (5), Angular and React Front End (5). Revise those first, then practise explaining one or two of your own projects end to end, because most Mphasis interviewers ask you to walk through real work.
Are these the exact questions asked at Mphasis?
No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Mphasis's. They are not a leaked or verified list of past questions.
Where does Mphasis hire .NET Full Stack professionals in India?
Mphasis has large teams in Bengaluru, Pune, Chennai. Openings and locations change often, so check the Mphasis careers page and filter by city and experience.