Tata Consultancy Services (TCS) is a well-recognized and established company worldwide. Being a part of this reputed firm is nothing less than gaining a badge of honor. So, this post will be useful if you are preparing to appear for an interview in this firm. Brought to you by a team of experienced writers at MindMajix, in this article, you can find the latest TCS interview questions with answers. Scroll down to know more.
Tata Consultancy Services (TCS) is a multinational company known for offering IT services and has its headquarters in Mumbai, India. It provides consultancy and software services in diverse industries, such as finance, healthcare, education, life science, insurance, energy, and retail. The company also offers analytics, IoT, blockchain, AI, cyber security, and automation services.
As far as the recruitment process for this company is concerned, it begins and ends with varying rounds. Throughout this process, you will be asked a variety of questions related to yourself, your work experience, your educational background, and more.
Now that you think you are ready to appear for an interview and grab a job at this company, MindMajix has brought a thorough, well-researched list of TCS interview questions in this post. So, without further ado, let’s get started with it.
TCS is one company that continues to hire people throughout the year. They have both off-campus and on-campus drives. Not just that, the organization also conducts several exams each year to hire new candidates, such as:
Generally, the company either conducts one interview where they have one MR session, one HR session, and one technical session. Or, they conduct two different rounds, one for the technical interview and the other for the HR session and MR session. Here is what you need to know about the TCS interview process:
Aptitude Test (TCS NQT)
This one is an online exam that is conducted on the platform TCS iON. This exam is divided into two sections, such as
Technical Interview
Just as the name suggests, the technical interview round is all about programming and technical questions. Once you have cleared your online exam, you will have to take this round. Herein, you will be asked some of the common questions, for example, about yourself, your past projects, preferred programming languages, and other technical questions concerning varying aspects and topics.
Managerial Round
In this round, you will find a few things from the technical round but in a more stringent way. The team of interviewers will be raising questions and doubts on your answers to cross-check whether you are capable of handling stress or not. Once you have reached this round, you must stay confident, calm, and have clear thoughts. Upon clearing this round, you will be sent for the HR round.
HR Interview
Once you have cleared the previous round, you will be taken for the HR interview round. As specified, HR will ask you a few basic questions. Throughout this round, you can even put forth questions from your end and clear out doubts if any.
A linked list comprises two fundamental parts: the link and the information. In a single connected listening program, the start of the list gets marked by a unique pointer, which is named start. This pointer points to the list’s first element and the link part of every node comprising an arrow looking to the next node. However, the list’s last node has a null pointer that identifies the previous node. Through the start pointer, the linked list gets traversed with ease.
If you want to enrich your career and become a professional in JavaScript then enroll in "JavaScript Training" - This course will help you to achieve excellence in this domain. |
It can be done through this mode:
//Base Class
class A
{
public int a;
}
//Derived Class
class B : A
{
a=15;
}
Below mentioned are the basic principles of an Object-Oriented Programming System (OOPS):
It can be done by using this code:
#include<stdio.h>
#include<conio.h>
void main()
{
int A[10]={'0','1','0','1','0','0','0','1','0','1','0','0'};
int x=0,y=A.length-1;
while(x
x++;
else if(A[y])
y--;
if(A[x] && !A[y])
A[x]=0,A[y]=1;
}
getch();
}
In OOPS, inheritance is a methodology that is based on classes. It refers to inheriting the properties and data of a parent class by a child class. A class that is derived from another level is generally known as a child class or a sub-class. Furthermore, the type from which the child class is inherited is known as a parent class or a super-class.
The function used to swap two numbers without using any temporary variable is mentioned below:
void swap(int &i, int &j)
{
i=i+j;
j=i-j;
i=i-j;
}
Polymorphism is one such concept that has different forms. To put it simply, it means that varying actions will be performed in diverse instances. Method overloading and operator overloading are two different types of polymorphism.
Here is the program to swap two different numbers without any third variable’s help:
/*
* C++ program to swap two numbers without using a temporary variable
*/
#include<iostream>
using namespace std;
/* Function for swapping the values */
void swap(int &a, int &b)
{
b = a + b;
a = b - a;
b = b - a;
}
int main()
{
int a, b;
cout << "Enter two numbers to be swapped : ";
cin >> a >> b;
swap(a, b);
cout << "The two numbers after swapping become :" << endl;
cout << "Value of a : " << a << endl;
cout << "Value of b : " << b << endl;
}
The different types of inheritances are as mentioned below:
Macros are preprocessor constants that get replaced at the time of compiling. Hence, in a program, they are a section of code that has a name. The compiler substitutes the name with the real code piece whenever the compiler comes across it.
The disadvantage of macros is that they cannot be used as function calls, meaning that they change the code simply. On the other hand, an advantage of macros is that they save time while substituting the same values.
#include <stdio.h>
// defining macros
#define TEXT "Hello"
#define EVEN 2
#define SUMMATION (8 + 2)
int main()
{
printf("String: %s\n", TEXT);
printf("First Even Number: %d\n", EVEN);
printf("Summation: 8+2=%d\n", SUMMATION);
return 0;
}
In the example given above, the instance of SUMMATION, EVEN, and TEXT will get substituted with anything that is in their body.
The following mentioned table shows the differences between classes and interfaces:
Classes | Interface |
It can get instantiated by creating its object. | It cannot get instantiated as all the methods are abstract and don’t perform actions. |
It can be declared through the class keyword. | It can be declared through the interface keyword. |
The class members can access specifiers as protected, public, and private. | The interface members cannot access specifiers as all the members are public. |
The methods are defined to perform certain actions on the declared fields. | The interface cannot assert in areas as it is entirely abstract. |
A class can integrate any number of the interface; however, it can extend just one superclass. | Interfaces can reach any number but cannot perform an interface. |
Basically, it is one technique that is majorly used to validate whether a message is authentic or not. In a way, a digital signature is a message digest’s encrypted version.
Encryption is referred to a process where text is converted into code. The major purpose here is to avert unauthorized access. On the other hand, decryption is a process where the encrypted data is transformed and converted into viable text that can be understood and read with ease.
It is initialized once and the value of a static identifier is retained during the application’s life. The memory value that the static variable allocates is used between the function call. Also, zero is the default value of an uninitialized static identifier.
Normalization is one such process that helps organize data in a database effectively. Two objectives of normalization are: to eradicate redundant data and to make sure data dependencies are sensible. Both of them are essential as they decrease the amount of space that a database consumes while making sure the data gets sorted logically.
Here is the code to differentiate between the sum of even and odd position digits:
#include
#include
#include
int main()
{
int a = 0,b = 0,i = 0, n;
char num[100];
printf("Enter the number:");
scanf("%s",num); //get the input up to 100 digit
n = strlen(num);
while(n>0)
{
if(i==0) //add even digits when no of digit is even and vise versa
{
a+=num[n-1]-48;
n--;
i=1;
}
else //add odd digits when no of digit is even and vice versa
{
b+=num[n-1]-48;
n--;
i=0;
}
}
printf("%d",abs(a-b)); //print the difference of odd and even
return 0;
}
Loops are generally used to execute statement blocks several times in a specific program based on the conditional statement. For every successful execution of a loop, the conditional statement should get checked. In case the conditional statement is true, the circuit will get executed. However, if it is false, it will get terminated.
#include <stdio.h>
int main()
{
int x = 10, *y, **z;
y = &x;
z = &y;
printf("%d %d %d", *y, **z, *(*z));
return 0;
}
The output of the code mentioned above is:
10 10 10
You use the JOIN keyword in an SQL statement to query data from either two or multiple tables on the basis of the relation between certain columns in the tables.
In a database, tables are generally related to one another with keys.
A view is referred to as a virtual table. It comprises columns and rows, similar to an actual table.
You can add SQL functions, JOIN, and WHERE statements to a view and put forth the data as if it was coming from a single table.
import java.util.*;
public class Test {
public static void main(String[] args)
{
int[] x = { 120, 200, 016 };
for (int i = 0; i < x.length; i++)
System.out.print(x[i] + " ");
}
}
The out of the program mentioned above is:
120 200 14
A database management system is a software system that is used to create and manage different databases. It ensures that the end users get to build and handle databases without any issues. Moreover, it also offers an interface between the application or the end-user and the databases.
void fun1(struct node* head)
{
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}
The given function helps print all the nodes of the linked list in a reverse order.
Here are the benefits of a Database Management System (DBMS):
Related Article: DBMS Interview Questions
Following is the program in C to reverse a string or an array:
#include<stdio.h>
/* Function to reverse arr[] from start to end*/
void rvereseArray(int arr[], int start, int end)
{
int temp;
while (start < end)
{
temp = arr[start];
arr[start] = arr[end];
arr[end] = temp;
start++;
end--;
}
}
/* Utility that prints out an array on a line */
void printArray(int arr[], int size)
{
int i;
for (i=0; i < size; i++)
printf("%d ", arr[i]);
printf("\n");
}
/* Driver function to test above functions */
int main()
{
int arr[] = {1, 2, 3, 4, 5, 6};
int n = sizeof(arr) / sizeof(arr[0]);
printArray(arr, n);
rvereseArray(arr, 0, n-1);
printf("Reversed array is \n");
printArray(arr, n);
return 0;
}
The output of the above code will be:
1 2 3 4 5 6
Reversed array is
6 5 4 3 2 1
While C does not have any classes, C++ does have classes. Also, C is not supportive of function overloading. Herein, for output and input, you will have to use different functions, such as printf(), scanf(), puts(), gets(), and more. Also, C is not supportive of exception handling either.
Here is the program in C to find the sum of elements in a specific array:
#include <bits/stdc++.h>
// function to return sum of elements
// in an array of size n
int sum(int arr[], int n)
{
int sum = 0; // initialize sum
// Iterate through all elements
// and add them to sum
for (int i = 0; i < n; i++)
sum += arr[i];
return sum;
}
int main()
{
int arr[] = { 12, 3, 4, 15 };
int n = sizeof(arr) / sizeof(arr[0]);
printf("Sum of given array is %d", sum(arr, n));
return 0;
}
The output of the above program is:
The sum of the given array is 34
The database schema is a set of sentences (formulas) known as integrity constraints. They are generally imposed on a database.
Also known as conditional expressions, conditional statements are the set of rules that can be executed if a specific condition is true. Often, it is referred to as an if-then statement considering if the statement is true, it will get executed.
A foreign key is a way you connect the primary tables and the second table. The reference key, on the other hand, is the primary key that gets referred to in another table.
Windows Communication Foundation (WCF) or Windows Presentation Foundation (WPF) applications are required in the .NET 3.0 framework. These apps cover the below-mentioned concepts
Windows Communication Foundation (WCF)
Windows Presentation Foundation (WPF)
Btree
Btree is made of leaf nodes and branch nodes. Basically, the branch nodes are meant to hold a prefix key value with a link to the lead node. On the other hand, a leaf node comprises the indexed row and value.
Bitmap
It comprises bits of every different value. Bitmap uses a string of bits to discover rows quickly in a table. It is also used to index low-cardinality columns.
Here are the differences between a clustered index and a non-clustered index:
Clustered Index | Non-Clustered Index |
There is only one clustered index per table. | It can be used a lot of times for one table. |
It is quicker to read as the data is stored physically in index order. |
It is quicker to insert and update operations. |
An array is a collection of the same elements. For an array, the important condition is that the type of data of all the elements available in an array should be the same. In C++, an array can be declared as
Int a[10];
This simply defines an array with a name as ‘a’ and ‘10’ elements from index 0-9.
Abstraction is a process that helps focus on and recognize important characteristics of an object or situation and filters out unnecessary components of that object or situation. Abstraction is the foundation for software development. Through this concept, you get to define the important factors of a system. The process of recognizing and designing the ideas for a specific system is known as Modeling.
There are three different levels of data abstraction, such as:
The calloc() function is used to allocate a memory area. The length is the product of the parameters. calloc fills the memory with ZERO’s and gets the pointer back to the first byte. In case it cannot locate ample space, it will get back to the NULL pointer.
The malloc() function also helps allocate a memory area where the length is the value put as the parameter. However, it does not initialize any memory area.
The free() function can be used to free up the assigned memory through the malloc or calloc function.
Lists
Tuple
Pass Statement
In simple terms, it is a null statement. Generally, a pass statement is used to postpone the time of compilation.
Break Statement
This one is a loop control statement that is generally used to end a loop in case the required target has been satisfied.
Call by Reference
This method is used in sending variable values from the caller to the caller function.
Call by Value
This is a method wherein a methodology is called upon with a parameter as the value.
Basically, storage classes in C are useful in describing the features of a function/variable. These storage classes are:
In C or C++, a structure is a user-defined data type. It helps create a data type that can be used to collect items of potentially diverse types into one single type.
In TCS company, two interview rounds take place. The first one is the technical round and the second one is the HR and MR round.
If you have good analytical skills, communication skills, problem-solving abilities, computer science knowledge, and C or C++ knowledge, TCS interviews will not be tough for you.
You can keep an eye on the available vacancies by navigating through their Careers page. Other than this, you can also apply for a job at TCS on LinkedIn and other job-related sites.
Generally, the questions asked in the TCS interview are about yourself, your academic knowledge, past work experience, and preferred programming language.
The basic salary in TCS is between Rs. 4,00,000 to Rs. 7,00,000 a year.
When appearing for a TCS interview, make sure you stay honest with your answers. Mention some keywords, such as the challenging, opportunity to build and maintain client relationships, steep learning curve, team environment, good work culture, opportunities for advancement and growth, demanding, rewarding, and more.
A good brand name, work environment, and leave policy are the top three reasons to join TCS.
No, the TCS HR round is not difficult. However, you will be asked some straightforward questions in this round that you must answer honestly.
If you don’t match the requirements or lie about your experiences, you may get rejected in TCS interviews.
No, TCS does not have a blacklist policy.
If you want to be an employee at TCS, you should be familiar with the TCS leadership principles that the company vouches after, such as:
Below mentioned are some useful tips to crack a TCS interview:
Once you have a complete list of TCS interview questions with answers in front of you, preparing for the same becomes a cakewalk. Thus, apart from your academic subjects and professional skills, make sure you go through the list of interview questions mentioned above as thoroughly as possible so as to not miss an opportunity of becoming a TCS employee.
"If you wish to learn about JavaScript, you may enroll in an JavaScript Training and achieve certification."
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
Name | Dates | |
---|---|---|
JavaScript Training | Apr 01 to Apr 16 | |
JavaScript Training | Apr 04 to Apr 19 | |
JavaScript Training | Apr 08 to Apr 23 | |
JavaScript Training | Apr 11 to Apr 26 |
Although from a small-town, Himanshika dreams big to accomplish varying goals. Working in the content writing industry for more than 5 years now, she has acquired enough experience while catering to several niches and domains. Currently working on her technical writing skills with Mindmajix, Himanshika is looking forward to explore the diversity of the IT industry. You can reach out to her on LinkedIn.
1 /15
Copyright © 2013 - 2023 MindMajix Technologies