Placement & HR

TCS Interview Questions for Freshers

TCS hires tens of thousands of freshers every year through the TCS National Qualifier Test (NQT), followed by an interview with technical, managerial (MR) and HR parts. These TCS interview questions cover what freshers are asked in each round, from OOP, SQL and coding basics to situational questions and "Why TCS?", with model answers.

30 questions · Updated

Reading answers is not the same as saying them.Practise TCS questions out loud and get a score, what you missed and a model answer for each one.
Practise free with AI
TCS interview process: 1. TCS NQT (Aptitude, reasoning and coding test), 2. Technical interview (Programming, OOP, DBMS and project), 3. Managerial round (Situations, attitude and flexibility), 4. HR round (Fit, relocation and documents), 5. Offer and ILP (Ninja, Digital or Prime, then training).
The TCS interview process, step by step.

How to prepare for the TCS interview

Technical round

Programming, OOP, DBMS, operating systems and your project, the core of most TCS fresher interviews.

1. Explain your final-year project.

Answer flow · 4 steps
  1. Give a two-minute summary: the problem, who it is for, the technologies, your own role, the hardest challenge and the result.

  2. For example: "We built an online bus pass system for our college using Java, JSP and MySQL.

  3. I designed the database and wrote the payment status module.

  4. The biggest challenge was preventing duplicate passes when two requests came at once, which we solved with a unique constraint and a transaction." Expect follow-up questions on any technology you mention.

2. What are the four pillars of object-oriented programming?

Answer flow · 4 steps
  1. Encapsulation bundles data and the methods that work on it into a class and hides internal details using access modifiers.

  2. Abstraction exposes only what is necessary, through abstract classes and interfaces.

  3. Inheritance lets a class reuse and extend another class's properties and methods, such as Car extending Vehicle.

  4. Polymorphism lets the same method behave differently, either at compile time through method overloading or at run time through method overriding.

3. What are the differences between C, C++ and Java?

Answer flow · 4 steps
  1. C is a procedural language with manual memory management and no classes.

  2. C++ adds object-oriented features such as classes, inheritance and polymorphism to C, and supports both procedural and OOP styles, with pointers and manual memory management.

  3. Java is fully object-oriented (apart from primitive types), compiles to bytecode that runs on the JVM so it is platform-independent, has automatic garbage collection, and does not expose pointers.

  4. Java also does not support multiple inheritance of classes, only of interfaces.

4. What is the difference between an abstract class and an interface in Java?

Answer flow · 3 steps
  1. An abstract class can have both abstract and concrete methods, instance variables, constructors and any access modifier, and a class can extend only one abstract class.

  2. An interface defines a contract: its variables are public, static and final, its methods are abstract by default, though since Java 8 it can have default and static methods, and a class can implement many interfaces.

  3. Use an abstract class for closely related classes sharing code, and an interface for a capability shared by unrelated classes, such as Comparable.

5. What are primary, foreign and unique keys?

Answer flow · 3 steps
  1. A primary key uniquely identifies each row in a table; it cannot be null and there is only one per table, such as student_id.

  2. A unique key also prevents duplicate values but can allow a null (one null in most databases), and a table can have several, such as email.

  3. A foreign key is a column that refers to the primary key of another table, such as enrolments.student_id referring to students.student_id, and it enforces referential integrity so you cannot add an enrolment for a student who does not exist.

6. Write a SQL query to find the second highest salary.

Answer flow · 3 steps
  1. One common way is to find the maximum salary that is less than the overall maximum.

  2. Another uses DENSE_RANK, which also works for the Nth highest salary and handles ties correctly.

  3. Mention both and explain that DENSE_RANK gives the same rank to equal salaries, so duplicates do not skip the result.

-- Using a subquery
SELECT MAX(salary) AS second_highest
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);

-- Using DENSE_RANK (change 2 to N for the Nth highest)
SELECT DISTINCT salary
FROM (
  SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
  FROM employees
) ranked
WHERE rnk = 2;

7. What are joins in SQL? Explain the types.

Answer flow · 5 steps
  1. A join combines rows from two or more tables based on a related column.

  2. An INNER JOIN returns only matching rows from both tables.

  3. A LEFT JOIN returns all rows from the left table and matching rows from the right, with nulls where there is no match; a RIGHT JOIN does the opposite.

  4. A FULL OUTER JOIN returns all rows from both tables.

  5. A CROSS JOIN returns every combination of rows, and a SELF JOIN joins a table to itself, such as finding each employee's manager in the same employees table.

8. What is normalisation? Explain 1NF, 2NF and 3NF.

Answer flow · 4 steps
  1. Normalisation organises tables to reduce duplicate data and avoid update, insert and delete anomalies.

  2. First normal form (1NF) requires atomic values, so no lists in a single column and no repeating groups.

  3. Second normal form (2NF) requires 1NF and that every non-key column depends on the whole primary key, not just part of a composite key.

  4. Third normal form (3NF) requires 2NF and that non-key columns depend only on the key, not on other non-key columns, so a student's city would not be stored next to their pin code in the same table if the pin code determines the city.

9. Write a program to check whether a string is a palindrome.

Answer flow · 4 steps
  1. A palindrome reads the same forwards and backwards, such as "madam".

  2. Compare characters from both ends, moving towards the middle, and stop at the first mismatch.

  3. This takes O(n) time and O(1) extra space.

  4. Mention that you could normalise the input first (lowercase, remove spaces) if the question allows phrases.

public static boolean isPalindrome(String s) {
    int i = 0, j = s.length() - 1;
    while (i < j) {
        if (s.charAt(i) != s.charAt(j)) return false;
        i++;
        j--;
    }
    return true;
}
// isPalindrome("madam") -> true, isPalindrome("tcs") -> false

10. What is the difference between a process and a thread?

Answer flow · 3 steps
  1. A process is a program in execution with its own memory space, resources and at least one thread; processes are isolated from each other, so one crashing does not usually affect another, but switching between them is expensive.

  2. A thread is the smallest unit of execution inside a process; threads of the same process share its memory and resources, which makes communication and context switching faster but needs synchronisation to avoid problems such as race conditions.

  3. A browser is a good example: each tab may be a process, with several threads inside it.

11. What is cloud computing? Explain IaaS, PaaS and SaaS.

Answer flow · 4 steps
  1. Cloud computing is the delivery of computing resources such as servers, storage, databases and software over the internet on a pay-as-you-go basis, instead of buying and managing your own hardware.

  2. IaaS (Infrastructure as a Service) provides virtual machines, storage and networks, such as AWS EC2; you manage the operating system and applications.

  3. PaaS (Platform as a Service) also manages the runtime and operating system, so you only deploy code, such as Google App Engine or Azure App Service.

  4. SaaS (Software as a Service) delivers complete applications, such as Gmail or Microsoft 365.

12. Swap two numbers without using a third variable.

Answer flow · 3 steps
  1. Use arithmetic: add both numbers into the first, then subtract to recover each value.

  2. Mention that the arithmetic method can overflow with very large integers, and that the XOR method avoids this.

  3. In real code a temporary variable is clearer, but the interviewer wants to see the logic.

int a = 5, b = 10;
a = a + b;   // a = 15
b = a - b;   // b = 5
a = a - b;   // a = 10

// XOR version, no overflow
a = a ^ b;
b = a ^ b;
a = a ^ b;

13. What is the SDLC, and what is Agile?

Answer flow · 4 steps
  1. The Software Development Life Cycle is the process of building software: requirement gathering, analysis, design, development, testing, deployment and maintenance.

  2. In the Waterfall model these phases happen one after another.

  3. Agile delivers software in short iterations called sprints, usually two weeks, with working software at the end of each, frequent client feedback and daily stand-ups.

  4. Most TCS projects use Agile or a hybrid, so knowing terms like sprint, backlog, stand-up and retrospective helps.

14. What is the difference between an array and a linked list?

An array stores elements in contiguous memory with a fixed size (in most languages), so accessing any element by index takes O(1) time, but inserting or deleting in the middle takes O(n) because elements must be shifted. A linked list stores elements in nodes that point to the next node, so its size can grow dynamically and insertion or deletion at a known position is O(1), but accessing the nth element takes O(n) and each node uses extra memory for the pointer.

Managerial round

Situations at work, attitude and flexibility. Sometimes combined with the technical or HR round.

15. Your deadline is close and a teammate is not doing their part. What will you do?

Answer flow · 4 steps
  1. First I would talk to the teammate privately to understand why: they may be stuck or overloaded.

  2. I would offer help or suggest splitting the work differently.

  3. If the deadline is still at risk, I would inform the team lead early, with facts and a proposed plan, rather than complaining or waiting until the last day.

  4. The goal is to deliver on time while keeping a good working relationship.

16. The client changes the requirements at the last minute. How do you handle it?

Answer flow · 3 steps
  1. I would first understand exactly what has changed and why, then assess the impact on effort, timeline and testing.

  2. I would share that with my lead so the client can be given clear options, such as delivering the original scope now and the change in the next release, or extending the deadline.

  3. I would never quietly skip testing to fit the change in, because a defect in production costs much more.

17. If you are allocated to a support project or a technology you have not studied, what will you do?

Answer flow · 3 steps
  1. I would accept it positively and learn quickly.

  2. Support projects teach you how real systems work in production, how to debug and how to deal with clients, which are valuable skills.

  3. I would use TCS's learning platforms and ask seniors for guidance, and once I had performed well, I would express interest in development work through the right channels.

18. Are you willing to relocate anywhere in India and work in shifts?

Answer flow · 4 steps
  1. Yes.

  2. TCS serves clients across time zones and has offices across India, so flexibility is expected.

  3. For example: "Yes, I am comfortable relocating to any location and working in rotational shifts.

  4. I see it as part of starting a career in a global company." If you have a genuine constraint, mention it honestly but show flexibility.

19. How would you explain your project to someone who is not technical?

Answer flow · 3 steps
  1. Avoid jargon and focus on the problem and the benefit.

  2. For example: "Students used to stand in a queue for an hour to renew their bus pass.

  3. Our website lets them apply and pay from their phone in two minutes, and the transport office sees all applications on one screen." Managers ask this to check whether you can talk to clients and business users.

20. Tell me about a time you had to learn something new quickly.

Answer flow · 3 steps
  1. Use a real example with a result.

  2. For example: "Our project guide asked us to add a dashboard two weeks before submission, and none of us knew charting libraries.

  3. I spent three evenings learning Chart.js from its documentation and YouTube, built the dashboard in a week and helped my teammates understand it." TCS values fast learners because freshers often join projects in unfamiliar technologies.

21. What would you do if you made a mistake that affected the client?

Answer flow · 3 steps
  1. Own it immediately: inform my lead with the facts, the impact and a proposed fix, rather than hiding it.

  2. Then help fix it as quickly as possible and, afterwards, find the root cause and add a check, such as a test case or a review step, so it does not happen again.

  3. Honesty early is always better than the client finding out later.

HR round

Questions about TCS, its hiring programmes, relocation, shifts and your plans.

22. Why do you want to join TCS?

Answer flow · 3 steps
  1. Give specific reasons: "TCS is India's largest IT services company and part of the Tata Group, which is known for its values and trust.

  2. It works with clients across banking, retail, healthcare and manufacturing, so I can learn different domains.

  3. Its Initial Learning Program gives freshers strong training, and TCS invests in new areas like AI and cloud, which is where I want to grow." Mention one thing you personally read about the company.

23. What do you know about TCS?

Answer flow · 4 steps
  1. Tata Consultancy Services was founded in 1968 and is part of the Tata Group, headquartered in Mumbai.

  2. It is one of the world's largest IT services companies by market value and employs more than six lakh people across many countries.

  3. It provides IT services, consulting and business solutions, and has products and platforms such as TCS BaNCS for banking, ignio for AI-based IT operations, and TCS iON for education and assessments.

  4. Before the interview, read one recent piece of TCS news, such as quarterly results or a major deal.

24. What is the TCS NQT?

Answer flow · 4 steps
  1. The TCS National Qualifier Test is TCS's main hiring test for freshers, conducted on the TCS iON platform.

  2. It typically has a foundation section (numerical, verbal and reasoning ability) and an advanced section (advanced quantitative and reasoning ability and coding).

  3. Your NQT score decides which role you are considered for and is also used by other companies that accept NQT scores.

  4. Check the current pattern on the official TCS NQT page before applying, as it is updated from time to time.

25. What are the TCS Ninja, Digital and Prime roles?

Answer flow · 5 steps
  1. They are the fresher hiring profiles.

  2. Ninja is the main entry-level role for most graduates.

  3. Digital is a higher profile for candidates who perform strongly in the advanced and coding sections, working on newer technologies.

  4. Prime is the top fresher profile with the most challenging assessments.

  5. Candidates are usually mapped to a role based on their NQT performance and interview, and the package rises with each profile.

26. What is the TCS Initial Learning Program (ILP)?

Answer flow · 4 steps
  1. ILP is TCS's training programme for freshers after joining, conducted at TCS training centres or online.

  2. It covers programming, technologies relevant to projects, soft skills and the TCS way of working, with assessments along the way.

  3. Performance in ILP can influence your project allocation.

  4. Showing that you know about ILP and are prepared to work hard in it creates a good impression.

27. Do you have any backlogs or education gaps?

Answer flow · 4 steps
  1. Answer honestly, as TCS verifies your documents.

  2. If you have a gap, explain the reason briefly and be ready to submit a gap declaration or certificate.

  3. If you had a backlog, mention that it is cleared.

  4. TCS sets eligibility rules on percentages, backlogs and gaps for each hiring drive, so check the current criteria on the official notification before applying.

28. What do you know about the Tata Group's values?

Answer flow · 3 steps
  1. The Tata Group is known for integrity, responsibility, excellence, pioneering and unity, and for the Tata Code of Conduct that employees follow.

  2. A large share of Tata Sons is owned by philanthropic trusts, so much of the group's profit supports education, health and community work.

  3. You can say these values matter to you because you want to work for an organisation that is trusted by clients and contributes to society.

29. Why should TCS hire you?

Answer flow · 3 steps
  1. Connect your skills and attitude to what TCS needs from freshers: "I have a strong foundation in Java and SQL, I have built two projects end to end, and I learn new technologies quickly, as I did with React for my final-year project.

  2. I am flexible about location, shifts and technology, and I am looking for a long-term career, not just a first job.

  3. I believe I can become productive quickly after ILP."

30. Where do you see yourself in five years at TCS?

Show growth within the company: "I see myself as a skilled developer who understands one client domain well, such as banking, has worked on several releases and is mentoring new joiners. I would also like to have earned a cloud certification and be moving towards a technical lead role."

Ready to test yourself?Pick your topics and level, answer by voice or text, and get instant feedback. Free.
Start a mock interview

Related skill interview questions

HR round, company and bank interview questions

Bank and government exams

Interview questions by field

Company names are trademarks of their respective owners. Interview Ready is an independent practice site and is not affiliated with or endorsed by any company listed here.