TCS is the largest Indian company, which was established by J. R. D. Tata, F. C. Kohli in 1968.
Now Rajesh Gopinathan is the Managing Director and CEO of Tata Consultancy Services. Every year
TCS hires nearly 20,000 freshers and more than that. The headquarter of TCS is in Mumbai, India.

This article is cover all the TCS Technical Interview Questions as well as TCS HR Interview Questions for freshers, along with TCS Interview Questions its also mention the latest recruitment process.

TCS is the best place to start as a fresher as well as grow your career. Mainly TCS recruit a very high number of students every year. Here it covers all the TCS interview questions and answers.

Now a days, TCS takes online interview in previous the HR of TCS comes in one of the colleges in
a city and take interview of all students. But now, TCS conducts an online interview and the
technical experts, as well as HR, are both the take interview of students at the same time,
mainly interview period is 15 minutes to 20 minutes but in some cases, it goes more than 30

TCS Criteria:

The criteria of TCS is 60.00% or above in 10th, 12th or Diploma and Average aggregate or average CGPA of all semesters of engineering, No backlogs should be there. The gap in studies for up-to only 2 years is allowed for valid reasons.

TCS Recruitment Process

TCS conducts 3 rounds are as follows

  • Online Round (Aptitude test, English, Coding MCQS, Coding)
  • Technical Round
  • HR Round

For more about TCS Recruitment Process click here.

Here are the list of TCS Technical Interview Questions

Here are the list of TCS HR Interview Questions

TCS Technical Interview Questions

What is pre-processing in C?

Answer: A Pre-processor is system software (a computer program that is
designed to run on the computer’s hardware and application programs). It performs
pre-processing of the High-Level Language(HLL). Pre-processing is the initial step of the language
processing system. The taks of language processing system is to translates the high-level language into machine
level language or absolute machine code(i.e. to the form that can be understood by machine).

The preprocessor in C doesn’t understand about the scope rules of in C language. Pre-processor directives like
#define come into impact as soon as they are seen and remain in effect until the end of the file
that includes them, the program’s block structures are irrelevant.

What is command line argument?

Answer: Getting the arguments from the command prompt in C is known as command-line arguments. In C, the main function has three arguments.They are:

  • Argument counter
  • Argument vector
  • Environment vector

Write a small program to display information in java?


public class AddTwoNumbers {

public static void main(String[] args) {

int num1 = 5, num2 = 15, sum;

sum = num1 + num2;

System.out.println(“Sum of these numbers: “+sum);



Example of Function Overloading.

public class Sum {

// Overloaded sum(). This sum takes two int parameters

public int sum(int x, int y)


return (x + y);


// Overloaded sum(). This sum takes three int parameters

public int sum(int x, int y, int z)


return (x + y + z);


// Overloaded sum(). This sum takes two double parameters

public double sum(double x, double y)


return (x + y);


// Driver code

public static void main(String args[])


Sum s = new Sum();

System.out.println(s.sum(10, 20));

System.out.println(s.sum(10, 20, 30));

System.out.println(s.sum(10.5, 20.5));



What are the four basic principles of OOPS?

Answer: The four basic principles of Object-Oriented Programming System are
listed below:

Abstraction: Abstraction is the process of hiding the implementation details and
showing only the functionality to the users. For example, sending MESSAGE where you type the text or numbers and
send the message. You don’t know the internal task about the delivery of message.

Abstraction allows you to focus on what the object does rather of how it does it.

Inheritance: Inheritance in Java is the mechanism in which one object gets all
the behaviours and attributes of a parent object.

Encapsulation: Encapsulation in Java is the process of binding code and data together in a single unit. For example, the mobile which is built with several components.

Polymorphism: Polymorphism in Java is a thought by which we can perform a single task in different ways. Polymorphism is acquired from 2 Greek words: poly and morphs. The word poly means many and morphs means forms. So polymorphism means many forms.

What is Polymorphism?

Answer: Polymorphism is a concept in OOPS which means having many forms. In
simple words, it means that different actions will be performed in different instances.
Polymorphism is of two types:

  • Method overloading
  • Operator overloading

What are the different types of inheritance?

Answer: Types of Inheritance:

  1. Single inheritance
  1. Multiple Inheritance
  1. Multi-level Inheritance
  1. Multi-path Inheritance
  1. Hierarchical Inheritance
  1. Hybrid Inheritance

What is the difference between classes and interface?

Answer: The differences between classes and interfaces are listed below:

A class can be instantiated by creating its object, whereas interfaces cannot be instantiated as
all the methods in the interface are abstract and do not perform any action, so there is no use
of instantiating an interface.

A class is declared using a class keyword whereas an interface is declared using an interface

The members of the class can have access specifier such as public, protected, and private but
members of the interface cannot have the access specifier, all the members of the interfaces are
declared as public because the interface is used to derive another class. There will be no use
to access specifies inside the members of an interface.

The methods inside the class are defined to perform some actions on the fields declared in the
class whereas interface lacks in asserting in areas, the ways in an interface are purely

A class can implement any number of the interface but can only extend one superclass. Whereas
interface can reach any number of interfaces but cannot perform any interface.

A class can have a constructor defined inside the class to declare the fields inside the class,
whereas the interface doesn’t have any constructor defined because there are no fields to be

Consider one example for better understanding

// I say all vehicles should look like this:
interface Vehicle
void run();
int getFuel();

// My team mate complies and writes vehicle looking that way
class Car implements Vehicle
int fuel;
void run()
int getFuel()
return this.fuel;

What do you know about SDLC?

Answer: Software Development Life Cycle (SDLC) represents the whole process of application development of its necessities analysis to maintenance. There are 5 stages of requirement analysis, design, development, testing & deployment, and maintenance or support.

What do you know about cloud computing?

Answer: Cloud computing is the availability of sources like data storage and computing requirements on-demand across the internet. The data is centrally located in tremendous data centres so that it is always available to the end-users. All the services, infrastructure, software and platform are accessible as services stored on a shared computing environment. Some major members are Azure from Microsoft, AWS from Amazon and Google’s cloud platform.

NOTELike the previous question, you will stick to a short answer,
otherwise interviewer will ask for more details because it has a subjective type

Explain the functionality of the linked list

Answer:  A linked list consists of two parts: information and the
link. In the single connected listening, the beginning of the list is marked by a unique pointer
named to start. This pointer does point to the first element of the list and the linked part of
each node consists of an arrow looking to the next node, but the last node of the list has null
pointer identifying the previous node. With the help of start pointer, the linked list can be
traversed easily.

What is inheritance?

Answer:  In, Object-Oriented Programming, inheritance is a mechanism
based on classes.

Inheritance refers to inhering the data members and properties of a parent class to a child
class. A class which is derived from another level is often called as a sub-class or a child
class, and the type from which the child class is obtained is known as super-class or parent

What is the way of inheriting the variable from one class to any other class?


//Base Class 

class A  


public int a; 


//Derived Class  

class B : A 




Are you familiar with the various SDLC methodologies?

Answer: There are 6 models –

Spiral – Similar to iterative but grants for more clarification as the project goes through all the steps in a spiral until it is completed.

Waterfall model (most traditional and common) – In a sequential phase by phase method, for illustration, after the requirements phase, the design phase is used up and then the next and so on.

V-shaped – Same as the waterfall model, although there is one testing phase after each development phase.

Big bang – The development starts with minimum knowledge of the requirement, thus requires small planning. It is proper only for small projects that include less risk.

Iterative – A quick way to build a basic product. Even when complete conditions are not known, you can start development. The process is repeated to improve and accommodate more requirements.

Agile – Currently, the most adopted method, the project is performed in phases, and the customers, developers, testers and onsite organisers work in tandem. Each new release is like a continuous development over every past release.

What is metadata? What is its purpose?

Answer: Metadata stores information about the data, that stores in HTML document. This is done using the tag (meta). Metadata can store data like keywords, page description, last modified date-time and can be used by web services, browsers and search engines.

What is a marquee?

Answer: It is an HTML element that causes text or image to scroll up, down,
left or right automatically. Example, a news flash where the text moves horizontally on the

Who developed C? (Mostly Asked)

Answer: C was developed by Dennis M. Ritchie.

Write a program to find if a number is prime?



using namespace std;

int main()


        int num,flag=0;


        for(int i=2;i<=num/2;i++)









                cout<<“Not Prime”;



        return 0;


More details about prime number program.

What is modularity? How is it done in C++?

Answer: A modular program is one which has been split into smaller modules,
and each module performs only one task (function) or a set of small functions/tasks. We can
implement modularity using OOPS concepts like encapsulation.

Tell the main difference between bubble sort, merge sort and insertion sort.

Answer: The interviewer won’t expect you to tell the whole algorithm.
You should just know the concepts and difference. 

Bubble sort – Simple sorting algorithm where two neighbouring
elements are compared at a time and swapped if the 1st is larger than 2nd.

Merge sort – Break the big array into smaller arrays of a single
element. Now, sort the arrays while merging them.

Insertion sort – There are two arrays. Elements from the unsorted array are considered one by one and inserted in the second array in a sorted manner.

What is a null pointer? How is it different from void pointer?

Answer: Null pointer is used for assigning the value of null or 0 to a
pointer variable i.e. a pointer that is not pointing to anything. The variables can be of any
data-type like int, char, float, long, etc…. 

The void pointer does not associate with any data-type. It can be store address of the variable of any data-type.

How is memory allocation done in C++? Is it the same in C?

Answer: Using new() operator. In C, it is done using malloc() and calloc()

What is the difference between ++i and i++ operation?

Answer: If ++ sign comes before the index, then the index is incremented
first and then an operation is performed. If ++ sign is put after the index, then the index is
incremented after the operation will performed.

For example,

int i = 0;

cout << ++i;

cout << i++;

both will print the value as 1.

Explain linked lists and queues.

Answer: Both are data structures in C++.

Linked list – In a linked list, each element is linked to the next
one using a pointer. The last element on the linked list points to null. The first element is called a
head. Each element contains data and the link to the next element in the list.

Queue – Queue is the FIFO (first in first out) mechanism. It is similar
to our line in Petrol Pump where the first customer goes in and comes out first. That means,
when the queue is full, the oldest element is flushed out first.

What is software development life-cycle?

Answer:  Software development life-cycle is the steps involved in the
life cycle of the software development phase. Generally, it is followed by the development team
which develops the software in the organization. It consists of a clear explanation of
developing and maintaining the software.

What is the normalization of databases, joins, and keys?

Answer:  Normalization is the process of organizing data
in a database efficiently. Two goals of the normalization process, first to eliminate redundant
data (for example, In more than one table, storing the same data) and second one is to ensure data
dependencies make sense (only storing related data in a table). These both are important as they
reduce the amount of space a database consumes and ensure that data is logically stored.

What are the loops?

Answer:  Loops are used to execute a block of statement several times
in a program depending upon the conditional statement. The basic structure of a circuit is given
above in the diagram. For each successful execution of the loop, the conditional statement
should be checked. If the conditional statement is true, then the circuit will be executed. If
the conditional statement is false, then the course will be terminated.

Explain about Joins, Views, Normalization, Triggers?

Answer: The Join keyword is used in an SQL
statement to query data from two or more tables, based on a relationship between specific
columns in these tables.

Tables in the database are often concern with each other with keys.

view is a virtual table. A look contains rows and columns, just like
a real table. The fields in a picture are fields from one or more real tables in the database.

You can only add the SQL functions, WHERE and JOIN statements to a view and present the data as if the data were coming from one single table.

Which sort algorithm is best?

Answer: The time complexity of Quicksort is O(n log n) in the best case,
O(n log n) in the average case, and O(n^2) in the worst case.
But because it has the most reliable performance in the average case for most inputs, Quicksort is generally viewed the
“fastest” sorting algorithm.

List different advantages of DBMS

Answer:  Improved data sharing.

The list of several advantages of Database Management System:

  1. Improved data security.
  1. Better data integration.
  1. Minimized data inconsistency.
  1. Improved data access.
  1. Improved decision making.
  1. Increased end-user productivity.

What is a style sheet?

Answer: It is a file that describes the layout of an HTML document or web
page. For example, the colour of a text, margins, spacing, fonts, size etc, everything comes
under stylesheet. The most common format is CSS (Cascading style sheets).

What is Database Management System?

Answer:  A DataBase Management System is a software system used for
creating and managing databases. DBMS makes it possible for the end-user to build and maintain
databases. DBMS provides an interface between the end-user/application and the databases.

What is database Schema?

Answer:  The formal definition of the database schema is a set of
formulas (sentences) called integrity constraints imposed on a database.

What are the conditional statements?

Answer:  The conditional statements can alternatively be called a
conditional expression also. Conditional comments are the set of rules which were executed if a
particular condition is true. It is often referred to as an if-then statement because if the
state is true, then the statement is executed.

What is the difference between the foreign key and the reference key?

Answer:  Reference Key is the primary key that is referenced in the
other table (linked via the other tables Foreign Key). Foreign Key is how you connect the second
table to the primary tables Primary Key (or Reference Key).

What is Linking in C?

Answer:  The object code is combined with the required supporting code
to make an executable program. This step typically involves adding in any libraries that are

Draw binary tree for given number 10,20,8,9,2,1

Linking in C

What are the types of arrays in c?

One dimensional array

Multi-dimensional array

• Two-dimensional array

• Three-dimensional array

• four-dimensional array etc.

What is a copy constructor?

Answer:  A copy constructor is the member function of which initializes an object using different object of the same class. A copy constructor has the following general function prototype:

ClassName (const ClassName &old_obj);

What is the const variable?

Answer: Whenever we use const qualifier with the variable name, it becomes
a read-only variable and gets stored in the .rodata segment. Any attempt to modify these read-only variables will then result in a compilation error: “assignment of the read-only

What are Static variables?

Answer:  Static variables have a property of maintaining their value even after they are out from their scope. Hence, static variables preserve their past value in their past scope and are not initialized repeat in the new scope.


static data_type var_name = var_value;

Write the output of the program?

int i=10; 



10 12 12

What are inheritance and abstraction?

Answer: One of the most fundamental concepts of OOPs is the Abstraction. Abstraction is a process where it shows the only “relevant” data and “hide” irrelevant details of an object from the user. For example, when you log-in to your Google account online, you enter your user_id and password and press login, what happens when you press login, how the input data sent to Google server, how it gets verified is all abstracted away from you.

Inheritance is the mechanism by which an object acquires some/all properties of another object.
It supports the concept of hierarchical classification.

TCS HR Interview Questions

Tell us something about yourself.

My name is Ram. I belong to Nagpur. I was born in my native place and brought up in Nagpur. I am a person who likes to explore new areas and meet new people. Coming to my academics, I have passed/pursing my B.Tech from GCOE. I have secured 72% in Class XII/Diploma and 82% in Class X. In my family, I have a father, mother, sister, grandfather & grandmother. I had a work experience of x months in PlacementPrep as a content writer and had gained a lot of knowledge about various languages.

What are your expectations from the company?

Though this answer is objective and can be different for different persons but remember to be positive in your thoughts and do not say many things about the company which gives the interviewer a misunderstanding that you are exaggerating.

In short, be realistic and precise. Also, refer to the sample answer given below.

I have from a long time needed to work with an IT company which manages its employees in the best way it can. I have always needed to work with an organization which provides a very comfortable and home-like the work environment and when it comes to TCS, I find that both the requirements are fulfilled. Even requirements I can hardly imagine are met, most importantly I get the opportunity to learn and enhance my skill-set to become a better professional in the future.

Will you be comfortable relocating?

Remember this answer requires a clear cut reply and needs to know as the company might provide time to time travel, therefore, do not try to be good and if you are not able to change places then tell them confidently if they have any positions for that kind of post they will consider you. Also, refer to the sample answer given below.

Yes, as part of beginning up I used to travel a lot as my father is an ex-serviceman hence occasionally he used to be posted throughout the country. Though I would prefer my city as it helps me live with people, I care about, but at the same time, I am ok with relocating.

What is your aim?

To be honest at this part, because all that the interviewer wants to know is whether your aim and goal match with the company’s objective or not.

What do you know about the TCS as a company?

TCS is the largest Indian company, which was established by J. R. D. Tata, F. C. Kohli in 1968. Now Rajesh Gopinathan is the Managing Director and CEO of Tata Consultancy Services. Every year TCS hires nearly 20,000 freshers and more than that. The headquarter of TCS is in Mumbai, India.

Tell me something about the most memorable day of your life?

By this question, the interviewer wants to check whether which situation is most important for you, take some time to gather your thoughts and speak up.

The most memorable day of my life would without any second thought be the day when I passed my graduation. That day I thought like now I can get a correct job lead an independent life and steadily I have turned from a dependent boy to independent man. I am now mature enough to take my life decisions and decide what is right for me and what is not. That day I recognised why my grandfathers and old people are so regretful and have so many memories associated with the Independence of our country and such small word independence could hold such huge meaning attached to it.

What are your strengths?

Never tell your strengths which you cannot prove on the spot. And speak only true strengths.

In my opinion, I am a team player I have always loved working as a team, performing for the improvement of the team has ever made me proud and getting to handle captaincy or leadership of my colleagues has always been the work I always loved.

Also, things that are hard to get and I like to get them, though it sounds a little bit complicated to understand so let me elaborate with an example, After my graduation I had not acquired skills required to get an excellent job through my communication skills were OK but I required in the technical part, and it was easy for me to take nonprofessional job also they had a charming pay scale and it was challenging for me to learn programming skills and become good in coding but I decided to get things the hard way and work till I succeed and thereafter I worked on the technical domain and here I am. So hard work ultimately pays off.

What are your weaknesses?

This is a touchy question but doesn’t be afraid, in this question the interviewer wants to know your weakness but tell them weakness such that they are also in some way of your strengths.

Though it is difficult to see your weakness yourself as we all know the general human tendency is to shift the blame and never take the responsibility for some wrongdoing. But to be honest, I find that when I want to achieve something, I work hard to get that though it might not be worth it to work so hard for the happiness that I get after attaining I work hard, so in the meantime I miss out on another event concurrently happening.

Why should we hire you?

This is a quite typical question and needs to be answered sensibly.

The requirement for this job completely matches my skill set, as a candidate I have knowledge of working in this domain which might be beneficial for the organization as well as me. Also, I am a quick learner and a team player so the organization won`t have to spend much time and resources on me. Even when I work, I work for the maximum benefit of the organization. Besides, I would gain exposure to the industry which will be very beneficial to my career.


“As a fresher or more active person, I need the platform to prove my strength. If I mind being a part of your company, then I’ll put all my effort and strength to uplift our company. None of us is born with experience and knowledge but if you hire me, I will definitely get the professional experience through your company.”

What are your hobbies?

It depends on you that what you are like and what are the hobbies do you have but always justify your answer.

For Example, 

My hobbies are like singing, Internet surfing, playing Chess, listening to music, watching the news channel and movies. In my extra time, I like to read the news on my phone or newspaper and travelling to my hometown. Thank you for giving me this opportunity to introduce myself.


“As I’m a fresher, I’ll be passionate about my work, and if given a chance I’ll be ready to expose myself into different sectors of work into the industry, and would be faithful to the company always.”


Please enter your comment!
Please enter your name here