TCS Interview Questions: Technical and HR Model Answers for Freshers
Prepare for technical follow-ups and HR evidence checks with worked SQL, coding, project, introduction and behavioural practice fixtures.
KnowledgeGate Team
Exam prep & CS education

Memorised answers fail under follow-ups and evidence checks. Candidate reports help you compile a topic list, but a list does not rehearse the answer. Practise six answer-level drills: a SQL result, code trace, concurrency defence, self-introduction, setback and honest constraint. Build each answer from your own resume evidence, and verify campaign details in your posting and invitation.
TCS interview questions: prepare answer shapes, not a memorised list
Prepare four buckets: resume and introduction, CS fundamentals, coding and project reasoning, then behaviour and constraints. Any resume claim invites follow-ups. Give each language, database, metric and responsibility a definition, example, evidence and limit.
For concepts, use definition -> concrete example -> trade-off -> check in 60 seconds: 10 + 25 + 15 + 10 = 60. For experience, use situation -> task -> action -> result -> reflection.
Use your assessment result and interview invitation to identify the written-stage context, then use TCS NQT & TCS Exams Preparation to revise the relevant areas. Do not assume a fixed stage order.
Technical question shape: solve a SQL result before discussing syntax
Illustrative prompt for Employee(emp_id, name, dept_id, salary): "Return the highest-paid employee in every department and preserve ties."
emp_id | name | dept_id | salary |
|---|---|---|---|
101 | Asha | 10 | 65000 |
102 | Ravi | 10 | 72000 |
103 | Meera | 20 | 68000 |
104 | Kabir | 20 | 68000 |
105 | Nila | 30 | 59000 |
Result first: Ravi for department 10; Meera and Kabir for 20; Nila for 30.
WITH ranked_employees AS (
SELECT emp_id, name, dept_id, salary,
DENSE_RANK() OVER (
PARTITION BY dept_id ORDER BY salary DESC
) AS salary_rank
FROM Employee
)
SELECT emp_id, name, dept_id, salary
FROM ranked_employees
WHERE salary_rank = 1
ORDER BY dept_id, emp_id;DENSE_RANK() preserves the department-20 tie; ROW_NUMBER() discards one. Grouped MAX(salary) does not return names. The primary key is emp_id. An index starting with dept_id, salary may help, but verify with EXPLAIN. Text salary makes ordering and arithmetic unsafe. See Technical Interview: OS, DBMS, CN & OOP Prep for wider fundamentals.
Coding question shape: trace the data before claiming complexity
Illustrative prompt: "Return the first non-repeating character in the string swiss; return no result if every character repeats." Counts are {s: 3, w: 1, i: 1}. Pass two visits indices 0, 1, 2, 3, 4, rejects s at 0 and returns w at 1. State w first.
Count with an insertion-preserving map, then scan for the first count of 1. For n = 5, k = 3, this takes 5 updates and 2 examined positions: O(n) time and O(k) space. For aabb, return no result.
A fixed array needs a bounded character set. Unicode needs map or code-point handling. Test "", "a", "aabb", "swiss", and decide whether case differs.
Project question shape: defend one design under a concurrency follow-up
Fictional example: a placement application tracker for 2,000 students and 80 recruiters, with a measured rehearsal peak of 120 concurrent users, 18 reads/second and 3 writes/second. Design: React, one Spring Boot modular monolith, PostgreSQL as system of record and an email outbox worker.
Send 25 simultaneous requests for (student_id = 417, job_id = 92). The transaction constraint allows 1 HTTP 201, maps 24 conflicts to HTTP 409, and leaves 1 row. "Check first, insert later" lets several requests pass before a commit.
Use claim, reason, evidence and limit. Choose the modular monolith because a four-person team and 18 + 3 = 21 requests/second do not prove another deployment boundary. Show a 25-request integration test, admit eventual email consistency, and require metrics and repeatable load tests before scaling. Replace these values with evidence.

TCS self-introduction and "why this role": connect the resume to evidence
Replace this fictional shell: 15 seconds for context, 30 for proof and 15 for fit. 15 + 30 + 15 = 60.
I am a final-year B.Tech IT student focused on Java and SQL. In our four-person placement tracker, I owned the application module, added the student-job uniqueness rule and wrote 14 integration tests, including the concurrent duplicate case. That work made me enjoy turning a vague workflow into testable behaviour. This role interests me because the current posting connects the same application-development and troubleshooting skills to real delivery work.
Use the structure, not the story: substitute your own timeline, role, action and evidence. For "why TCS?", cite one posting or invitation fact, connect one skill, then name one learning goal. Do not invent company scale, clients, training, location, technology or promotion.
HR behavioural question shape: turn a setback into an auditable STAR answer
Illustrative prompt: "Tell me about a project setback and what you changed." In a fictional ten-day project, day-6 integration gives 17 failing tests because two modules use incompatible JSON field names. The candidate owns the missed check, calls a 20-minute interface review, freezes schema version 2, writes 6 contract tests and pairs with two teammates on broken endpoints. Failures reach 3 that evening, 0 on day 8, and the day-10 demo stays.
Budget 90 seconds: 20 for situation and task, 40 for personal action, 15 for result, 15 for reflection. 20 + 40 + 15 + 15 = 90. End: "I should have agreed the payload contract before parallel work began; on the next project I added contract tests on day 1." Own the mistake and action, without hiding behind "we". Passing tests do not prove production quality. Continue with HR Interview Questions for Freshers & Answers.

HR follow-ups: answer constraints, weaknesses and unknowns without bluffing
Fictional weakness: explanations average 142 seconds across four mocks. With the 60-second frame, the next two take 64 and 58 seconds without losing definition, example or trade-off. "I am a perfectionist" needs cost, action and evidence.
For relocation, availability, shifts or other conditions, use truth -> available range -> clarifying question. State a genuine 21-day commitment, then ask what is required. Never accept an unknown condition to sound flexible. Terms are campaign-specific.
For an unknown, say: "I know the uniqueness constraint prevents duplicate committed rows; I am not certain how this database reports the losing transaction at each isolation level. I would reproduce two concurrent transactions and inspect the database error before choosing the service mapping." This beats guessing.
TCS interview mock: run, score and repair one 45-minute loop
Run a self-made loop, not an official TCS duration: 5 minutes for introduction and resume, 20 for SQL, coding and project, 12 for setback, weakness and constraints, 8 for replay and notes. 5 + 20 + 12 + 8 = 45.
Score 20: technical accuracy 6, reasoning and trade-offs 4, resume ownership 4, HR evidence 4, concision 2. 6 + 4 + 4 + 4 + 2 = 20. Require two consecutive scores of at least 16/20, with no zero.
Log K for missing knowledge, S for weak structure, E for missing evidence and B for bluffing. Repair only the dominant code: revise one concept for K, re-record with the frame for S, find a real artefact or number for E, or replace invention with an honest boundary for B.
Technical answers need result, reasoning, trade-off and check. Projects need ownership and an invariant. HR answers need evidence and reflection. The Interview & Resume Preparation Course supports training and mock practice. Use your current TCS posting to replace every fictional skill, constraint and value with resume evidence, then run the 45-minute mock today.
Keep learning

Accenture Coding Questions: 4 Patterns with Solved Dry Runs
Stop memorising company-question lists. Learn four reusable coding patterns through precise examples involving strings, arrays, digits, and matrices.

Accenture Placement Preparation: 4-Week, 56-Hour Study Plan
Turn four preparation lanes into a practical weekly calendar. Start with a baseline, move hours towards your errors, and recover missed sessions without cramming.

Capgemini Interview Questions: Technical and HR Rounds with Model Answers
Practise clear technical and HR answers through Java, SQL, a coding trace and one consistent project story. Each example shows what to say and how to support it.

Capgemini Drive Mistakes: Stage-by-Stage Rejection Risks and Fixes
Diagnose the controllable evidence gaps behind common Capgemini drive risks. Repair your CV, timed practice, code traces, project proof and behavioural stories with worked drills.