Jawab AI

Interview guides / Tech Mahindra interview questions for freshers

Tech Mahindra Interview Questions for Freshers 2026

Welcome to the ultimate Tech Mahindra interview preparation guide for freshers in 2026. Whether you are graduating from a tier-2 or tier-3 college, this guide helps you prepare for technical rounds, HR discussions, and coding basics. Tech Mahindra looks for strong fundamentals, problem-solving skills, and good communication. Read through these questions, understand what the interviewer is checking, and practice saying the answers out loud.

Try Jawab AI free

Basic Programming and Fundamentals

  1. 1. What is the difference between compiler and interpreter?

    A compiler translates the entire source code into machine code at once before execution, showing all errors together. An interpreter translates code line by line during execution and stops at the first error. For example, C uses a compiler, while Python uses an interpreter. The interviewer is checking your core computer science fundamentals.

  2. 2. What are pointers in C and why do we use them?

    A pointer is a variable that stores the memory address of another variable. We use pointers for dynamic memory allocation, efficient array handling, and passing variables by reference in functions to modify their original values. The interviewer wants to see if you understand memory management.

  3. 3. Explain object-oriented programming with real-world examples.

    OOPs is a programming approach based on objects and classes. The four main pillars are Encapsulation, Inheritance, Polymorphism, and Abstraction. For example, a 'Car' class can have properties like speed and color, and methods like drive. The interviewer is checking your understanding of standard software design concepts.

  4. 4. What is the difference between method overloading and method overriding?

    Method overloading happens when multiple methods in the same class have the same name but different parameters (compile-time polymorphism). Method overriding happens when a subclass provides a specific implementation of a method that is already defined in its parent class (run-time polymorphism). The interviewer wants to test your Java or C++ OOP knowledge.

  5. 5. What is garbage collection in Java?

    Garbage collection is the process of automatically reclaiming runtime memory by destroying unused objects that are no longer referenced in the program. This helps prevent memory leaks. The interviewer is checking your knowledge of memory safety features in modern languages.

  6. 6. What is a constructor?

    A constructor is a special block of code that is automatically called when an object of a class is created. It is used to initialize the object's properties. It has the same name as the class and no return type. The interviewer wants to test basic class instantiation concepts.

Data Structures and Algorithms

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

    An array stores elements in contiguous memory locations, allowing fast index-based searching in O(1) time, but insertion and deletion are slow. A linked list stores elements across non-contiguous memory locations using nodes and pointers, making insertions and deletions efficient, but searching takes O(n) time. The interviewer is checking your ability to choose the right data structure.

  2. 8. What is a stack and where is it used?

    A stack is a linear data structure that follows the Last In, First Out (LIFO) principle. Elements are added and removed from the same end called the top. Common operations are push, pop, and peek. It is used in function call management, expression evaluation, and undo mechanisms in software.

  3. 9. Explain binary search and its time complexity.

    Binary search is an efficient search algorithm used on sorted arrays. It repeatedly divides the search interval in half. If the target value is less than the middle item, it narrows the search to the lower half, otherwise to the upper half. Its time complexity is O(log n). The interviewer wants to know if you understand logarithmic efficiency.

  4. 10. What is the difference between BFS and DFS in graphs?

    Breadth-First Search (BFS) explores the graph level by level using a queue, finding the shortest path in unweighted graphs. Depth-First Search (DFS) explores as deep as possible along each branch using a stack or recursion before backtracking. The interviewer is checking your graph traversal knowledge.

  5. 11. What is a hash collision and how is it resolved?

    A hash collision occurs when two different keys hash to the same index in a hash table. It can be resolved using techniques like separate chaining (using linked lists at that index) or open addressing (probing for the next available slot). The interviewer is testing your problem-solving depth in data structures.

Database Management and SQL

  1. 12. What is the difference between DBMS and RDBMS?

    A DBMS stores data as files and does not enforce relationships between tables, making it suitable for single users or small data. An RDBMS stores data in structured tables with rows and columns, enforces relationships using keys, and supports ACID properties for multiple users. The interviewer is checking your fundamental database concepts.

  2. 13. Explain primary key and foreign key with an example.

    A primary key uniquely identifies each record in a table and cannot contain null values, such as EmployeeID. A foreign key is a field in one table that uniquely identifies a row of another table, creating a link between them, such as DepartmentID in the Employee table referencing the Department table. The interviewer wants to verify your schema design knowledge.

  3. 14. What are the different types of joins in SQL?

    SQL joins combine rows from two or more tables based on a related column. Inner Join returns records with matching values in both tables. Left Join returns all records from the left table and matched records from the right. Right Join returns all records from the right table. Full Outer Join returns all records when there is a match in either left or right table.

  4. 15. What is normalization and why is it important?

    Normalization is the process of organizing database tables to reduce data redundancy and improve data integrity. It involves dividing large tables into smaller ones and defining relationships. Common forms are 1NF, 2NF, and 3NF. The interviewer is checking your ability to design efficient databases.

  5. 16. Write a query to find the second highest salary from an employee table.

    You can write: SELECT MAX(Salary) FROM Employee WHERE Salary < (SELECT MAX(Salary) FROM Employee); Alternatively, using limit: SELECT Salary FROM Employee ORDER BY Salary DESC LIMIT 1 OFFSET 1; The interviewer wants to see practical SQL writing skills.

HR and Behavioral Questions

  1. 17. Tell me about yourself.

    I recently graduated with a degree in Computer Science from my college. During my studies, I built strong fundamentals in data structures, Java, and database management. I also completed a project where I built a web application using basic frontend and backend technologies. I am eager to start my career at Tech Mahindra, learn new enterprise technologies, and add value to the team.

  2. 18. Why do you want to join Tech Mahindra?

    Tech Mahindra is a global leader in digital transformation and IT services, working with top clients across industries. I want to build my career here because the company provides great learning opportunities, exposure to cutting-edge technologies, and a structured growth path for freshers.

  3. 19. How do you handle pressure or tight deadlines?

    When facing tight deadlines, I break down the task into smaller manageable steps, prioritize them based on urgency and importance, and focus on one task at a time. If I get stuck, I communicate early with my team lead or mentor to seek guidance instead of wasting time.

  4. 20. Where do you see yourself in the next five years?

    In the next five years, I see myself growing into a senior technical role at Tech Mahindra. I want to master full-stack development or cloud technologies, take up leadership responsibilities in managing project modules, and mentor newer team members.

  5. 21. Are you open to relocation and working in different shifts?

    Yes, I am flexible and open to relocation based on project requirements. I understand that IT services operate globally, and I am comfortable working in different shifts as needed to support clients effectively.

Tips for the interview

  • Revise your final year project thoroughly because interviewers often ask deep questions about your specific implementation choices.
  • Keep your answers crisp and clear; avoid beating around the bush when you do not know a concept.
  • Practice writing basic SQL queries and code snippets on paper or a whiteboard as virtual or face-to-face interviews often require it.
  • Show a positive attitude toward continuous learning since service-based companies value adaptability above all.

Blank on a question? Not anymore.

Jawab AI listens to your interview and shows a clear answer on your screen in seconds, based on your resume. The desktop app stays invisible when you share your screen. Your first 3 sessions of 10 minutes are free.

Try Jawab AI free

More interview guides

These are commonly asked questions with sample answers, not an official list. Hiring processes change, so check the company's careers page for the current one. Jawab AI is not affiliated with any company named here.