Infosys interview questions
22 questions candidates report from Infosys interviews, plus the general HR questions every interviewer asks. Each has a model answer and the follow-ups to expect.
Typical selection process
Online test (aptitude, logical, verbal, pseudocode, puzzles), then a technical and HR interview, often in one sitting. Specialist Programmer and Digital Specialist Engineer roles add a harder coding round.
As reported by recent candidates. Always check the latest official notification.
39 questions
HRFlexibilityEasyAre you willing to relocate to any location and work in night shifts if needed?
Reported at TCS, Infosys, Wipro, Accenture, Cognizant, Capgemini
Are you willing to relocate to any location and work in night shifts if needed?
Reported at TCS, Infosys, Wipro, Accenture, Cognizant, Capgemini
What they are checking: Mass recruiters place freshers wherever projects need them. A hesitant answer can end the interview.
Model answer
Yes. I understand that projects are spread across cities and time zones, and as a fresher I want the widest set of opportunities.
I have already lived away from home for four years in a hostel, so moving cities is not a concern for me. If a client needs support in their time zone I'm comfortable with shifts. I'd only ask to know the schedule in advance so I can plan around it.
Tips
- If you have a genuine constraint, mention it honestly but briefly; do not bargain in the first round.
HRAcademicsMediumYou had a backlog in your second year. What happened?
Reported at TCS, Infosys, Wipro, Cognizant, Accenture
You had a backlog in your second year. What happened?
Reported at TCS, Infosys, Wipro, Cognizant, Accenture
What they are checking: Accountability. They are checking whether you blame others and whether the problem is behind you.
Model answer
Yes, I had a backlog in Engineering Mathematics III in my third semester. Honestly, I underestimated the subject and spent too much time on a hackathon that month.
I cleared it in the next attempt with [72] marks. After that I made a study timetable for every semester and I haven't had a backlog since; my last three semesters are all above [8 SGPA].
It taught me to plan time for the subjects I find hard instead of only the ones I enjoy.
Tips
- Own it in one sentence, then move on to the fix and the evidence.
- Check the company's eligibility rules on active backlogs before you apply.
HRCommitmentEasyAre you comfortable signing a service agreement for the first year or two?
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini, Accenture
Are you comfortable signing a service agreement for the first year or two?
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini, Accenture
What they are checking: The company spends months training freshers and wants confidence you will stay.
Model answer
Yes. The company invests a lot in training freshers, so it's fair to expect a commitment in return. I'm planning to build my career here for the long term anyway, so the agreement doesn't change my plans.
Could you share the details of the agreement, such as its duration, so I understand it fully before signing?
Tips
- Read the agreement terms before accepting the offer, but do not argue about them in the interview.
HRMotivationMediumYou studied mechanical engineering. Why do you want to move into IT?
Reported at TCS, Infosys, Wipro, Cognizant, Accenture, Capgemini
You studied mechanical engineering. Why do you want to move into IT?
Reported at TCS, Infosys, Wipro, Cognizant, Accenture, Capgemini
What they are checking: Whether the switch is a real interest backed by effort, or just a fallback.
Model answer
I enjoyed mechanical engineering, but the part I liked most was writing MATLAB and Python scripts to analyse our lab data. In my third year I automated our thermodynamics lab calculations, which saved my batch hours every week, and I realised I wanted to build software full time.
Since then I've completed [the NPTEL Python and DBMS courses], solved around 150 coding problems, and built a small inventory app for a local hardware shop using Python and SQLite.
My mechanical background also helps: I'm used to working with real-world constraints and data, which is useful in manufacturing and automotive client projects.
Tips
- Show what you have already done to make the switch.
- Turn your core branch into an advantage.
HRSelf-assessmentMediumWhich programming language are you most comfortable with? Rate yourself out of 10.
Reported at TCS, Infosys, Wipro, Cognizant
Which programming language are you most comfortable with? Rate yourself out of 10.
Reported at TCS, Infosys, Wipro, Cognizant
What they are checking: A trap and a guide. Whatever language and number you give decides how hard the next questions are.
Model answer
I'm most comfortable with Java. I'd rate myself a 7 out of 10.
I'm confident with OOP, collections like ArrayList and HashMap, exception handling, and writing programs on arrays and strings. I've built two projects in Java, including a Spring Boot REST API.
I'm not giving myself higher because I haven't worked much with multithreading or the JVM's memory internals in a real project yet. Those are what I'm learning next.
Tips
- Do not say 9 or 10; the interviewer will try to prove you wrong.
- Say what you know and what you do not. That honesty is what they are testing.
Likely follow-ups
- What is the difference between HashMap and Hashtable?
- Write a program to reverse a string in Java.
- What is the difference between == and equals()?
HRMotivationEasyWhy Infosys?
Reported at Infosys
Why Infosys?
Reported at Infosys
What they are checking: Whether you have researched Infosys specifically.
Model answer
Infosys is known for investing in freshers. The training at the Mysuru campus is one of the largest corporate training programmes in the world, and I'd like to start my career with that kind of structured learning.
I also respect how Infosys was built: founded by seven people with a small amount of money, and grown into a global company known for governance. Its values, summed up as C-LIFE, match how I want to work, especially integrity and excellence.
And Infosys works on modern areas like cloud and AI through platforms such as Infosys Cobalt and Topaz, so I'd learn current technology, not just maintain old systems.
Tips
- Mention training at Mysuru, the founding story, values, and current technology.
HRCompany knowledgeMediumWhat are Infosys's core values?
Reported at Infosys
What are Infosys's core values?
Reported at Infosys
What they are checking: Preparation. Infosys interviewers often check whether you know C-LIFE.
Model answer
Infosys's values are summed up as C-LIFE:
- Client value: delivering solutions that make the client more successful.
- Leadership by example: setting standards through your own work.
- Integrity and transparency: being ethical and open in every interaction.
- Fairness: treating people objectively and with respect.
- Excellence: always improving the quality of what you deliver.
Integrity matters most to me. In my internship I found a bug in code I had already submitted, and I reported it to my lead myself rather than hoping nobody would notice. We fixed it before it reached users.
Tips
- After listing them, connect one value to a real story of your own.
BehaviouralLearning agilityEasyTell me about a time you had to learn something new quickly.
Reported at TCS, Infosys, Accenture, Cognizant, Capgemini, Wipro
Tell me about a time you had to learn something new quickly.
Reported at TCS, Infosys, Accenture, Cognizant, Capgemini, Wipro
What they are checking: Service companies assign freshers to any technology, so they need fast learners.
Model answer
For a college hackathon our team decided to build a chatbot, and I was the only one free to handle deployment, although I had never used AWS.
I gave myself one evening: I followed AWS's own getting-started guide for EC2, deployed a sample app, and wrote down every command in a doc. The next day I deployed our Flask bot and set up a domain. When something broke I read the error, searched it, and noted the fix.
We finished on time, and the doc I wrote became the deployment guide our club still shares with juniors. My approach to anything new is official docs first, a tiny working example, then the real task.
BehaviouralManagerial roundMediumTwo days before release, the client asks for a change. What would you do?
Reported at TCS, Infosys, Accenture, Cognizant
Two days before release, the client asks for a change. What would you do?
Reported at TCS, Infosys, Accenture, Cognizant
What they are checking: Managerial-round thinking: do you protect the client relationship and the team, rather than just saying yes or no?
Model answer
I wouldn't say yes or no immediately.
First I'd understand the change: what exactly they need and why it matters to them now. Then I'd estimate the effort with my lead and check the risk to the release, since a rushed change two days out could break something that already works.
Then I'd go back to the client with options. If the change is small and low risk, we can include it with extra testing. If it's bigger, we can release on time and deliver the change in a quick follow-up release, or move the date if the change is critical to them.
Whatever we decide, I'd confirm it in writing so everyone has the same expectation.
TechnicalOOPEasyExplain the four pillars of object-oriented programming with examples.
Reported at TCS, Infosys, Wipro, Cognizant, Accenture, Capgemini
Explain the four pillars of object-oriented programming with examples.
Reported at TCS, Infosys, Wipro, Cognizant, Accenture, Capgemini
What they are checking: The single most common fresher technical question. They want clear definitions and an everyday example for each, not textbook lines.
Model answer
- Encapsulation: keeping data and the methods that change it together, and hiding the data behind those methods. A BankAccount class keeps balance private and only allows changes through deposit() and withdraw(), which can check for a negative balance.
- Abstraction: showing only what the user needs and hiding how it works. You call car.start() without knowing how the fuel injection works. In Java this is done with abstract classes and interfaces.
- Inheritance: a class reusing and extending another class. SavingsAccount extends BankAccount and adds interest calculation without rewriting deposit and withdraw.
- Polymorphism: one interface, many forms. A Shape reference can hold a Circle or a Square, and shape.area() runs the right version at run time (overriding). Method overloading, the same method name with different parameters, is compile-time polymorphism.
Encapsulation is about protecting data, while abstraction is about hiding complexity; interviewers often ask for that difference next.
Likely follow-ups
- What is the difference between overloading and overriding?
- Can you achieve multiple inheritance in Java?
- Abstraction vs encapsulation?
TechnicalOperating systemsEasyWhat is the difference between a process and a thread?
Reported at TCS, Infosys, Wipro, Capgemini, Microsoft
What is the difference between a process and a thread?
Reported at TCS, Infosys, Wipro, Capgemini, Microsoft
What they are checking: Basic OS understanding, often a lead-in to concurrency questions.
Model answer
A process is a running program with its own memory space. A thread is a unit of execution inside a process; all threads of a process share its memory.
- Memory: processes are isolated from each other; threads share heap memory and global data but each has its own stack.
- Cost: creating and switching between processes is more expensive than threads.
- Communication: processes need inter-process communication (pipes, sockets, shared memory); threads can simply read shared variables, which is fast but needs locks to stay correct.
- Failure: if one process crashes others keep running; a crashing thread can bring down its whole process.
Example: each Chrome tab runs as a separate process so one bad tab doesn't crash the browser, while inside a tab, separate threads handle rendering and JavaScript.
Likely follow-ups
- What is a race condition?
- What is a mutex?
TechnicalOperating systemsMediumWhat is a deadlock? What conditions cause it and how can you prevent it?
Reported at TCS, Infosys, Microsoft, Amazon
What is a deadlock? What conditions cause it and how can you prevent it?
Reported at TCS, Infosys, Microsoft, Amazon
What they are checking: Concurrency fundamentals.
Model answer
A deadlock is when two or more processes wait for each other forever. Thread A holds lock 1 and waits for lock 2, while thread B holds lock 2 and waits for lock 1.
All four conditions must hold at the same time (the Coffman conditions):
- Mutual exclusion: a resource can be held by only one process.
- Hold and wait: a process holds one resource while waiting for another.
- No preemption: resources cannot be taken away forcibly.
- Circular wait: a cycle of processes, each waiting for the next.
Prevention means breaking any one condition. The most practical is to break circular wait by always acquiring locks in a fixed global order. Other options are timeouts on lock acquisition, or acquiring all needed resources at once. Avoidance algorithms like the Banker's algorithm check that granting a request keeps the system in a safe state.
TechnicalDatabasesMediumWhat is normalisation? Explain 1NF, 2NF and 3NF.
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini
What is normalisation? Explain 1NF, 2NF and 3NF.
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini
What they are checking: DBMS fundamentals, very common in service-company interviews.
Model answer
Normalisation is organising tables to reduce duplicate data and avoid update problems.
- 1NF: every column holds a single value, with no lists or repeating groups. A "phones" column holding "98xxx, 99xxx" breaks 1NF; move phones to separate rows or a separate table.
- 2NF: 1NF, plus every non-key column depends on the whole primary key, not part of it. In a table keyed on (student_id, course_id), student_name depends only on student_id, so it belongs in a Students table.
- 3NF: 2NF, plus non-key columns depend only on the key, not on other non-key columns. If a Students table has department_id and department_name, department_name depends on department_id, so move it to a Departments table.
Without normalisation, renaming a department means updating thousands of rows, and missing one leaves the data inconsistent. In analytics systems, we sometimes denormalise on purpose to make reads faster.
Likely follow-ups
- What is BCNF?
- When would you denormalise?
TechnicalDatabasesEasyWhat is the difference between a primary key, a unique key and a foreign key?
Reported at TCS, Infosys, Wipro, Cognizant
What is the difference between a primary key, a unique key and a foreign key?
Reported at TCS, Infosys, Wipro, Cognizant
What they are checking: DBMS basics.
Model answer
- Primary key: uniquely identifies each row. It cannot be NULL and a table has only one, such as student_id.
- Unique key: values must be unique but, in most databases, it can contain NULL, and a table can have several, such as email or phone.
- Foreign key: a column that refers to the primary key of another table, enforcing the relationship. Enrollments.student_id refers to Students.student_id, so you cannot enrol a student who doesn't exist.
By default, a primary key also creates a clustered index in databases such as SQL Server and MySQL's InnoDB, which decides the physical order of rows.
TechnicalDatabasesMediumWhat are ACID properties?
Reported at Infosys, Accenture, Amazon
What are ACID properties?
Reported at Infosys, Accenture, Amazon
What they are checking: Understanding of transactions, often illustrated with a bank transfer.
Model answer
ACID describes what a database guarantees for a transaction. Take transferring ₹500 from A to B:
- Atomicity: all or nothing. Either both the debit from A and the credit to B happen, or neither does.
- Consistency: the transaction moves the database from one valid state to another; rules such as "balance cannot be negative" are never broken.
- Isolation: concurrent transactions don't see each other's half-finished work; two transfers from A at the same time behave as if run one after the other.
- Durability: once committed, the transfer survives a crash or power failure, because it is written to disk or a log.
TechnicalJavaMediumWhat is the difference between an abstract class and an interface in Java?
Reported at TCS, Infosys, Cognizant, Wipro, Capgemini
What is the difference between an abstract class and an interface in Java?
Reported at TCS, Infosys, Cognizant, Wipro, Capgemini
What they are checking: Java OOP depth.
Model answer
- Methods: an abstract class can have abstract and fully implemented methods. An interface has abstract methods, and since Java 8 can also have default and static methods.
- State: an abstract class can have instance variables and constructors. Interface fields are always public static final constants.
- Inheritance: a class can extend only one abstract class but implement many interfaces.
- Access: abstract class members can be private or protected; interface methods are public.
Use an abstract class when related classes share code and state, such as a base Vehicle with a common fuel field. Use an interface to define a capability that unrelated classes can share, such as Comparable or Runnable.
interface Payable { double pay(); }
abstract class Employee implements Payable {
protected String name;
Employee(String name) { this.name = name; }
abstract double monthlySalary();
public double pay() { return monthlySalary(); }
}
class FullTime extends Employee {
FullTime(String name) { super(name); }
double monthlySalary() { return 50000; }
}TechnicalData structuresEasyWhat is the difference between a stack and a queue? Give real uses.
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini
What is the difference between a stack and a queue? Give real uses.
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini
What they are checking: Data structure basics.
Model answer
A stack is Last In, First Out: you push and pop from the same end, like a pile of plates. A queue is First In, First Out: you add at the back and remove from the front, like a ticket line.
Stack uses: undo in an editor, the browser back button, function calls (the call stack), checking balanced brackets, depth-first search.
Queue uses: printer jobs, handling requests in order on a server, breadth-first search, message queues between services.
Both support their main operations in O(1) time.
Likely follow-ups
- How would you implement a queue using two stacks?
TechnicalAlgorithmsEasyExplain binary search and its time complexity.
Reported at TCS, Infosys, Accenture, Cognizant
Explain binary search and its time complexity.
Reported at TCS, Infosys, Accenture, Cognizant
What they are checking: Algorithm basics and the ability to code it without off-by-one errors.
Model answer
Binary search finds an element in a sorted array by repeatedly halving the search range. Compare the target to the middle element: if equal you're done; if smaller search the left half; if larger search the right half.
Each step halves the range, so it takes O(log n) time; one million elements need at most about 20 comparisons. It uses O(1) extra space when written iteratively. It only works on sorted data.
def binary_search(arr, target):
lo, hi = 0, len(arr) - 1
while lo <= hi:
mid = lo + (hi - lo) // 2
if arr[mid] == target:
return mid
if arr[mid] < target:
lo = mid + 1
else:
hi = mid - 1
return -1Writing mid = lo + (hi - lo) // 2 instead of (lo + hi) // 2 avoids integer overflow in languages like Java and C++.
TechnicalCodingEasyWrite a program to reverse a string without using built-in reverse functions.
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini
Write a program to reverse a string without using built-in reverse functions.
Reported at TCS, Infosys, Wipro, Cognizant, Capgemini
What they are checking: Basic coding fluency. Talk through the approach before writing.
Model answer
Use two pointers, one at each end, and swap characters as they move towards the middle. O(n) time and O(n) space (Java strings are immutable, so we work on a char array).
static String reverse(String s) {
char[] c = s.toCharArray();
int i = 0, j = c.length - 1;
while (i < j) {
char t = c[i];
c[i] = c[j];
c[j] = t;
i++;
j--;
}
return new String(c);
}Test cases to mention: an empty string, a single character, and an even and an odd length.
Likely follow-ups
- Reverse the words in a sentence instead of the characters.
- Check whether a string is a palindrome.
TechnicalCodingEasyFind the second largest element in an array in one pass.
Reported at TCS, Infosys, Accenture, Capgemini
Find the second largest element in an array in one pass.
Reported at TCS, Infosys, Accenture, Capgemini
What they are checking: Edge-case thinking: duplicates of the maximum, and arrays with fewer than two distinct values.
Model answer
Track the largest and second largest as you scan. Sorting would work but costs O(n log n); one pass is O(n).
def second_largest(arr):
first = second = float("-inf")
for x in arr:
if x > first:
first, second = x, first
elif first > x > second:
second = x
return None if second == float("-inf") else second
print(second_largest([10, 5, 10, 8])) # 8
print(second_largest([7, 7])) # NoneThe condition first > x skips duplicates of the maximum, so [10, 5, 10, 8] returns 8 and not 10.
