Hexaware .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 Hexaware hiring for .NET Full Stack roles
Hexaware Technologies is an Indian IT services company offering cloud, application, testing, data and business process services. It promotes an automation-first approach and serves clients in financial services, healthcare, travel and manufacturing. In India it hires for software engineers, test engineers, data analysts and data engineers.
For .NET Full Stack roles, this Hexaware practice set focuses most on C# Fundamentals (7), OOP in C# (5), LINQ, Collections and Generics (5), Async Programming and Multithreading (4). It has 15 easy, 14 medium, 1 hard questions, so you can start easy and work up to the harder ones.
Company type
IT services
Headquarters
Navi Mumbai, India
Main India offices
Navi Mumbai, Chennai, Pune, Bengaluru, Noida
Hexaware .NET Full Stack interview process
Online assessment (aptitude + coding)
Communication assessment
Technical interview
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for HexawareStart 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.
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.
02
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.
03
What is the difference between const, readonly and static readonly?
const is a compile-time constant, implicitly static, and its value is copied into calling assemblies, so changing it requires recompiling them. readonly fields are set at declaration or in the constructor and can differ per instance. static readonly is set once per type at runtime, so it can hold values like DateTime.Now or a new object. Use const only for values that will never change, such as Math.PI.
04
What is the difference between an abstract class and an interface in C#?
An abstract class can have fields, constructors, implemented and abstract members, and a class can inherit only one. An interface defines a contract; a class can implement many. Since C# 8, interfaces can have default method implementations but still no instance fields. Use an abstract class for shared state and base behaviour among closely related types, and interfaces for capabilities like IComparable or for dependency injection.
05
What is the difference between temporary tables and table variables?
Temporary tables (#Temp) live in tempdb, support indexes and statistics, and are visible to nested procedures, so they suit larger intermediate results. Table variables (@T) also use tempdb but have limited statistics, which made old optimisers estimate one row; SQL Server 2019 improved this with deferred compilation. Table variables are not affected by transaction rollback. Use table variables for small sets and temp tables for large ones.
06
What are the four pillars of object-oriented programming?
Encapsulation hides internal state behind methods and properties. Abstraction exposes only what the caller needs, using abstract classes and interfaces. Inheritance lets a class reuse and extend another class. Polymorphism lets one interface have many implementations, so code calls Pay() without knowing whether it is a card or UPI payment. Together they make code easier to change, test and reuse.
07
What is the difference between method overloading and method overriding?
Overloading means several methods with the same name but different parameter lists in the same class, resolved at compile time, for example Add(int, int) and Add(double, double). Overriding means a derived class provides a new implementation of a virtual or abstract base method with the same signature, resolved at runtime based on the actual object type. Overloading is compile-time polymorphism; overriding is runtime polymorphism.
ASP.NET Core has a built-in ILogger<T> abstraction injected into any class. You log with levels Trace, Debug, Information, Warning, Error and Critical, and configure minimum levels per category in appsettings.json. Use structured logging with message templates, like logger.LogInformation("Order {OrderId} placed", id), so values become searchable fields. Providers such as Serilog or OpenTelemetry send logs to files, Seq, Elasticsearch or Application Insights.
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.
10
Write a C# method to reverse a string without using Array.Reverse or LINQ.
static string ReverseText(string input)
{
char[] chars = input.ToCharArray();
int left = 0, right = chars.Length - 1;
while (left < right)
{
(chars[left], chars[right]) = (chars[right], chars[left]);
left++;
right--;
}
return new string(chars);
}
Two pointers swap from both ends, giving O(n) time and O(n) space for the char array.
11
What is the difference between a static class and a singleton?
A static class cannot be instantiated, cannot implement interfaces and is initialised by the runtime; it suits stateless helpers like Math. A singleton is a normal class with exactly one instance, so it can implement interfaces, be passed as a parameter and be mocked in tests. In ASP.NET Core, you rarely write a singleton by hand; you register the class with AddSingleton and let the DI container manage its lifetime.
12
Write a BackgroundService that cleans expired OTPs every 5 minutes.
public class OtpCleanupService(IServiceScopeFactory scopes) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken ct)
{
using var timer = new PeriodicTimer(TimeSpan.FromMinutes(5));
while (await timer.WaitForNextTickAsync(ct))
{
using var scope = scopes.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
await db.Otps.Where(o => o.ExpiresAt < DateTime.UtcNow).ExecuteDeleteAsync(ct);
}
}
}
// builder.Services.AddHostedService<OtpCleanupService>();
A scope is created because DbContext is scoped while hosted services are singletons.
13
What is the difference between IEnumerable and IQueryable?
IEnumerable<T> works on in-memory data and executes LINQ with C# delegates, so filters run in the application. IQueryable<T> holds an expression tree that a provider such as EF Core translates into SQL, so filtering, sorting and paging happen in the database. If you return IEnumerable from a repository and then call Where, all rows may be loaded first. Keep queries as IQueryable until the final shape is ready.
14
Show the newer LINQ methods Chunk, DistinctBy and MaxBy.
// split 1,000 ids into batches of 100 for bulk API calls
foreach (int[] batch in ids.Chunk(100))
await SendBatchAsync(batch);
// unique customers by email
var unique = customers.DistinctBy(c => c.Email).ToList();
// highest-paid employee object, not just the salary
Employee? top = employees.MaxBy(e => e.Salary);
These were added in .NET 6 and remove the need for custom helpers or third-party libraries like MoreLINQ.
15
What is the difference between JIT compilation and Native AOT in .NET?
With JIT, the app ships as IL and the runtime compiles methods to machine code when first called; tiered compilation later recompiles hot methods with better optimisation. Native AOT compiles everything ahead of time into a single native executable, giving very fast startup and lower memory, which suits containers and serverless. The trade-off is limited reflection and dynamic code generation, so some libraries need source generators to work.
16
Write a SQL Server query to find the second highest salary.
-- using DENSE_RANK (handles ties)
SELECT Salary
FROM (
SELECT Salary, DENSE_RANK() OVER (ORDER BY Salary DESC) AS rnk
FROM Employees
) t
WHERE rnk = 2;
-- using OFFSET
SELECT DISTINCT Salary
FROM Employees
ORDER BY Salary DESC
OFFSET 1 ROW FETCH NEXT 1 ROW ONLY;
Change 2 to N for the Nth highest salary.
HashSet<T> stores unique values with O(1) average lookup, add and remove. Use it when you need fast membership checks, such as checking if an email already exists in a batch of 1 lakh records, or to remove duplicates. It also supports set operations like UnionWith, IntersectWith and ExceptWith. It does not keep insertion order or allow index access; use SortedSet<T> if you need sorted unique values.
18
What is the difference between Select and SelectMany?
Select projects each element to one result, so a list of customers mapped to their orders gives a list of lists. SelectMany projects each element to a sequence and flattens all sequences into one, so customers.SelectMany(c => c.Orders) gives a single list of all orders. In EF Core, SelectMany over a navigation collection translates to a SQL join, which is handy for reports.
Generics let you write classes and methods with a type parameter, such as List<T> or Repository<T>, that work with any type while staying type-safe. Benefits are compile-time checking instead of casts, no boxing for value types, and code reuse. For example, one generic Result<T> type can wrap any API response. The CLR creates specialised code for value types and shares code for reference types.
20
Explain the transient, scoped and singleton service lifetimes.
Transient services are created every time they are requested, suitable for lightweight stateless helpers. Scoped services are created once per HTTP request and shared within it; DbContext is registered as scoped. Singleton services are created once for the whole application lifetime, suitable for caches and configuration. Choose based on state: anything holding per-request data must not be singleton, and singletons must be thread-safe.
21
What is the difference between DELETE, TRUNCATE and DROP?
DELETE removes rows one by one, supports WHERE, fires triggers and is fully logged, so it is slower on big tables. TRUNCATE removes all rows by deallocating pages, is minimally logged, resets identity values and cannot have WHERE; it fails if foreign keys reference the table. DROP removes the whole table including structure, indexes and permissions. In SQL Server, both DELETE and TRUNCATE can be rolled back inside a transaction.
22
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.
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.
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.
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.
ref passes a variable by reference; it must be initialised before the call and the method can read and change it. out also passes by reference but need not be initialised, and the method must assign it before returning, as in int.TryParse. in passes by reference as read-only, which avoids copying large structs while preventing changes. Overusing ref and out makes code harder to read, so tuples are often cleaner.
A view is a saved SELECT query that acts like a virtual table; it simplifies complex joins and can restrict which columns users see, but by default it stores no data. An indexed view has a unique clustered index, so SQL Server physically stores and maintains its results, which speeds up heavy aggregations. The cost is slower writes on base tables, and it requires SCHEMABINDING and deterministic expressions.
28
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.
29
What is the difference between controllers and Minimal APIs?
Controllers group actions into classes with attributes for routing, filters and model binding, which suits large APIs with many conventions. Minimal APIs map endpoints directly with app.MapGet and lambdas, with less ceremony and slightly better performance, ideal for microservices and small APIs. Since .NET 7 they support filters, route groups and OpenAPI, and .NET 10 adds built-in validation, so both are production-ready choices.
30
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.
Tips to crack the Hexaware .NET Full Stack interview
Practise aptitude and simple coding questions under time pressure for the online assessment.
Revise automation testing basics with Selenium and API testing, as quality engineering is an important service line.
Learn about Hexaware's automation and cloud focus and its key industry verticals for company questions.
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; Hexaware interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Hexaware .NET Full Stack interview?
Candidates usually go through 4 stages: Online assessment (aptitude + coding); Communication assessment; 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 Hexaware .NET Full Stack interview?
This practice set leans on C# Fundamentals (7), OOP in C# (5), LINQ, Collections and Generics (5), Async Programming and Multithreading (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Hexaware interviewers ask you to walk through real work.
Are these the exact questions asked at Hexaware?
No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Hexaware's. They are not a leaked or verified list of past questions.
Where does Hexaware hire .NET Full Stack professionals in India?
Hexaware has large teams in Navi Mumbai, Chennai, Pune, Bengaluru, Noida. Openings and locations change often, so check the Hexaware careers page and filter by city and experience.