TCS interview experience Real time questions & tips from candidates to crack your interview

SDE

TCS
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Data Structures, Computer Network,DevOps, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Do 500 good quality questions
Tip 2 : Have some decent project in your resume

Application process
Where: Campus
Eligibility: Above 6 CGPA
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration120 minutes
Interview date28 Aug 2022
Coding problem2

Basically some coding questions where there and rest are MCQ

1. MCQ Questions

Verbal Ability 24 
Numerical Ability 26 
Reasoning Ability 30 
Programming Logic 10 
Hands-on Coding 1 
Hands-on Coding 1

 

Number Of MCQs - 90

2. Nth Fibonacci Number

Easy
0/40
Asked in companies
SAP LabsHCL TechnologiesWalmart

The n-th term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -

    F(n) = F(n - 1) + F(n - 2), 
    Where, F(1) = 1, F(2) = 1


Provided 'n' you have to find out the n-th Fibonacci Number. Handle edges cases like when 'n' = 1 or 'n' = 2 by using conditionals like if else and return what's expected.

"Indexing is start from 1"


Example :
Input: 6

Output: 8

Explanation: The number is ‘6’ so we have to find the “6th” Fibonacci number.
So by using the given formula of the Fibonacci series, we get the series:    
[ 1, 1, 2, 3, 5, 8, 13, 21]
So the “6th” element is “8” hence we get the output.
Problem approach

#include 
int main() {

int i, n;

// initialize first and second terms
int t1 = 0, t2 = 1;

// initialize the next term (3rd term)
int nextTerm = t1 + t2;

// get no. of terms from user
printf("Enter the number of terms: ");
scanf("%d", &n);

// print the first two terms t1 and t2
printf("Fibonacci Series: %d, %d, ", t1, t2);

// print 3rd to nth terms
for (i = 3; i <= n; ++i) {
printf("%d, ", nextTerm);
t1 = t2;
t2 = nextTerm;
nextTerm = t1 + t2;
}

return 0;
}

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date3 Nov 2022
Coding problem3

1. OOPS Question

What is virtual function?

Problem approach

In object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important part of the polymorphism portion of object-oriented programming.

2. DBMS Question

What is foreign key?

Problem approach

The FOREIGN KEY constraint is used to prevent actions that would destroy links between tables.

A FOREIGN KEY is a field (or collection of fields) in one table, that refers to the PRIMARY KEY in another table.

The table with the foreign key is called the child table, and the table with the primary key is called the referenced or parent table.

3. Puzzle Question

There are 3 jars, namely, A, B, C. All of them are mislabeled. Following are the labels of each of the jars:

A: Candies
B: Sweets
C: Candies and Sweets (mixed in a random proportion)

You can put your hand in a jar and pick only one eatable at a time. Tell the minimum number of eatable(s) that has/have to be picked in order to label the jars correctly.

Problem approach

You have to pick only one eatable from jar C. Suppose the eatable is a candy, then the jar C contains candies only(because all the jars were mislabeled).

Now, since the jar C has candies only, Jar B can contain sweets or mixture. But, jar B can contain only the mixture because its label reads “sweets” which is wrong.

Therefore, Jar A contains sweets. Thus the correct labels are:
A: Sweets.
B: Candies and Sweets.
C: Candies.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
SDE - 1
2 rounds | 4 problems
Interviewed by TCS
0 views
0 comments
0 upvotes
Digital Technology Intern
2 rounds | 2 problems
Interviewed by TCS
845 views
0 comments
0 upvotes
TCS Ninja
3 rounds | 5 problems
Interviewed by TCS
1052 views
0 comments
0 upvotes
SDE
2 rounds | 4 problems
Interviewed by TCS
393 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE
3 rounds | 6 problems
Interviewed by PhonePe
0 views
0 comments
0 upvotes
company logo
SDE
5 rounds | 8 problems
Interviewed by Mathworks
1223 views
0 comments
0 upvotes
company logo
SDE
4 rounds | 7 problems
Interviewed by PhonePe
0 views
0 comments
0 upvotes