Home  >  Blog  >   JavaScript  > 

TCS Interview Questions

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.

Rating: 4.9
  
 
1001

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 Interview Process

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:

  • TCS National Qualifier Test (NQT)
  • TCS iON
  • TCS Digital
  • TCS Codevitta

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:

  • Interview Rounds

  • 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

  • Foundation Section: The foundation section is meant to test your traits, verbal ability, reasoning ability, and numerical ability.
  • Advanced Section: This section evaluates your advanced reasoning ability, advanced coding ability, and advanced quantitative ability.
  • 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.

Top 10 TCS Frequently Asked Questions

  1. What is the function of a linked list?
  2. Define the basic principles of OOPS.
  3. Define polymorphism.
  4. What are macros? Define their advantages and disadvantages.
  5. What do you know about database management systems?
  6. What are the benefits of DBMS?
  7. Differentiate between foreign key and reference key.
  8. What are WCF and WPF?
  9.  What do you know about an array?
  10. How would you define a pass and break statement?

TCS Technical Interview Questions For Beginners 

1. What is the function of a linked list?

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.

2. How would you inherit one class’s variable to another class?

It can be done through this mode:

//Base Class  
class A   
{   
public int a;  
}  
//Derived Class  
class B : A  
{  
a=15;  
}  

3. Define the basic principles of OOPS.

Below mentioned are the basic principles of an Object-Oriented Programming System (OOPS):

  • Abstraction: It is a process that hides the implementation details and shows the functionality to the user. For instance, when you send an SMS, you simply type and send, but you are unaware of the internal processing that goes into delivering the message. With abstraction, you concentrate on what the object is doing and not on how it is doing it.
  • Inheritance: In Java, inheritance is referred to as a method wherein one object gets all the behaviors and properties of its parent object.
  • Encapsulation: This is a process wherein you wrap code and data together in one single unit.
  • Polymorphism: Polymorphism is a concept through which you can perfect a single action in varying ways.

MindMajix Youtube Channel

4. Given the array of 1s and 0s, arrange the 1s and 0s together in one scan of an array. Also, optimize the conditions of the boundary.

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();  
}  

5. Define inheritance.

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.

6. What function will you use to swap two numbers without using any temporary variable?

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;  
}  

7. Define polymorphism.

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.

8. Can you write a program in C to swap two different numbers without taking any help from a third variable?

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;  
}  

9. What are the types of inheritances?

The different types of inheritances are as mentioned below:

  • Single Inheritance
  • Hybrid Inheritance
  • Multiple Inheritance
  • Hierarchical Inheritance
  • Multiple Inheritance
  • Multipath Inheritance
  • Multi-Level Inheritance

10. What are macros? Define their advantages and disadvantages.

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. 

11. Differentiate between classes and interfaces.

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.

12. How will you define digital signature?

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. 

13. What are encryption and decryption?

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. 

14. Explain static identifiers.

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. 

TCS Interview Questions For Intermediate

15. Define the normalization of keys, joins, and databases.

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. 

16. You have a maximum of 100 digit numbers as the input. Now, differentiate between the sum of even and odd position digits. 

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;
}

17. Define loops.

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. 

18. Write the output of the below-mentioned code.

#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

19. Can you explain joins, views, normalization, and triggers?

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. 

20. Write the output of the following program.

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

21. What do you know about database management systems?

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. 

22. What does the given function do for a linked list with its head as the first node?

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. 

23. What are the benefits of DBMS?

Here are the benefits of a Database Management System (DBMS):

  • Enhanced data security
  • Increased productivity for end-users
  • Better data integration
  • Enhanced decision making
  • Decreased data inconsistency
  • Enhanced data access

Related Article: DBMS Interview Questions

24. Can you write a program in C to reverse a string or an array?

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 

25. What are the differences between C and C++?

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. 

26. Can you write a program in C to find the sum of elements in a specific array?

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

27. Define database schema.

The database schema is a set of sentences (formulas) known as integrity constraints. They are generally imposed on a database.

28. What do you know about conditional statements?

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. 

29. Differentiate between foreign key and reference key.

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.

TCS Interview Questions For Advanced

30. What are WCF and WPF?

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)

  • The new service-orientated attributes
  • Creating the proxy
  • The interface use
  • Asynchronous delegates
  • The callbacks use

Windows Presentation Foundation (WPF)

  • Styles
  • Databinding
  • Templates
  • Animations 

31. Differentiate between the b-tree index and the bitmap index.

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.

32. Differentiate between a clustered index and a non-clustered index.

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.

33. What do you know about an array?

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.

34. What is data abstraction? Why is it important?

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:

  • Logical Level: Herein, the information is stored in a database.
  • Physical Level: On this level, the data is stored physically in a database.
  • View Level: End-users get to work on this level. If any amendments or changes are to be made, they might get saved by some other name.

35. How do you allocate memory in C or C++?

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.

36. What are the list and tuple?

Lists

  • They are used to retain information in a single variable
  • A list is different from an array as the latter can only comprise homogeneous elements and the former can store heterogeneous elements
  • In Python, lists serve the same objective as arrays

Tuple

  • Tuples are same as lists; however, the only exception is that they are not mutable
  • Tuples are more preferable than lists as they can be created instantly and with ease

37. How would you define a pass and break statement?

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. 

38. What are a call-by reference and call-by value?

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. 

39. What are the four storage classes in C?

Basically, storage classes in C are useful in describing the features of a function/variable. These storage classes are:

  • Auto: This one is the default storage class for all of the variables that have been declared in a block or a function.
  • Register: It helps declare register variables with the same functionality as an auto variable.
  • Extern: This storage class is used to tell us that a variable can be defined elsewhere and not in the same block where it has been used. 
  • Static: Static storage class is used to declare the static variables, used commonly when writing C programs. 

40. Define structures in C.

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.

Most Commonly Asked TCS FAQ

41. What are the TCS interview rounds?

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.

42. Are TCS interviews hard?

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.

43. How do I apply for a job at TCS?

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.

44. What are the basic questions asked in the TCS interview?

Generally, the questions asked in the TCS interview are about yourself, your academic knowledge, past work experience, and preferred programming language.

45. What is the basic salary in TCS?

The basic salary in TCS is between Rs. 4,00,000 to Rs. 7,00,000 a year.

46. What should I say in the TCS interview?

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.

47. What are the top 3 reasons you joined TCS?

A good brand name, work environment, and leave policy are the top three reasons to join TCS.

48. Is TCS HR Round difficult?

No, the TCS HR round is not difficult. However, you will be asked some straightforward questions in this round that you must answer honestly.

49. Do people get rejected in TCS interviews?

If you don’t match the requirements or lie about your experiences, you may get rejected in TCS interviews.

50. Does TCS blacklist if the offer is rejected?

No, TCS does not have a blacklist policy.

TCS Leadership Principles

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:

  • Integrity: The company believes to be fair, ethical, honest, and transparent in the conduct; everything that the employees do should stand the public scrutiny.
  • Responsibility: The employees are committed to integrating social and environmental principles in the business.
  • Excellence: TCS is passionate about accomplishing high standards of quality while promoting meritocracy.
  • Pioneering: The company has promised to be agile, and bold and take more challenges while developing innovative solutions by keeping customers’ insights in mind.
  • Unity: TCS is all about investing in its partners and people, enabling consistent learning, and developing collaborative and caring relations on the basis of mutual respect and trust.

Tips to Crack TCS Interview

Below mentioned are some useful tips to crack a TCS interview:

  • Stay confident: The first and foremost step is to stay confident. If you possess enough confidence, you will already be halfway through it. Make sure you elude positive vibes and have a smile on your face throughout the interview.
  • Study technical subjects: Make sure you study all the technical subjects well and practice the response to frequently asked TCS interview questions. Pick up your preferred programming language and study as much as you can about it.
  • Know about the company: While TCS is a well-known firm, it is always a good idea to know everything about it before you appear for the interview. There are chances that the interviewer might check your company’s knowledge. So, visit their website and learn about their products and services. Understand their mission and vision and try to implement the same in your answers.
  • Perfect your resume: Make sure your resume is accurate and up-to-date. The interviewer will consider resumes that are on-point, error-free, and properly formatted. Also, make sure your resume targets the position you are applying for.

Conclusion

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."

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
JavaScript TrainingApr 01 to Apr 16
JavaScript TrainingApr 04 to Apr 19
JavaScript TrainingApr 08 to Apr 23
JavaScript TrainingApr 11 to Apr 26
Last updated: 28 March 2023
About Author
Remy Sharp
Himanshika Sharma

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

 

Recommended Courses

1 /15