Practice
Resources
Contests
Online IDE
New
Free Mock
Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
Scaler
Explore Offerings by SCALER

Before you go!

Take this "TCS NQT Interview Questions" interview guide with you

Welcome to Interviewbit, help us create the best experience for you!

Currently, You are a:

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your career...

Current Company *
Enter company name *
Experience *

You're all set!

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

TCS NQT Interview Questions

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

About TCS NQT

TCS NQT's also known as TCS National Qualifier Test or Tata Consultancy Services National Qualifier Test is an exam through which TCS hires candidates for TCS Ninja and TCS Digital roles. These are Software Engineering profiles in TCS. The candidates are mainly freshers with less than 2 years of work experience. The score of the mass recruiting test i.e. TCS NQT is valid for 2 years. The candidates have to go through some rounds of the NQT exam and after that, they can get selected for either a TCS Ninja profile (3.36-3.60 LPA) or a TCS Digital profile (7 LPA approx).

TCS NQT Recruitment Process

Interview Process

The TCS NQT recruitment process comprises the following 4 rounds.

  1. Online Test
  2. Technical Interview
  3. Managerial Interview
  4. HR Interview

Interview Rounds

1. Online Test: The first round is the online test. In this round, aptitude and coding skills play a major role. Following is the distribution of the number of questions per topic:

Sections Duration (in mins) No of Questions
Verbal Ability 30 24
Reasoning Ability 50 30
Numerical Ability 40 26
Programming Logic 15 10
Coding 45 2
Total 180 92

Please note that the number of questions per topic is as per the analysis of the previous papers. It might not be exactly the same every year. Also, it is very important to perform well in this round as if you do not get selected in this round, you will not be getting an interview.

2. Technical Interview Round: In the technical interview round, you will be asked questions based on the skills mentioned in your resume. Some major topics of discussion in the technical interview can be data structures and algorithms, your projects, core computer science subjects (OOPS, DBMS, OS, and Computer Networks), puzzles, etc. It is advisable to go through your resume once before you sit for an interview as you should be aware of the skills you have mentioned in your resume and be well prepared for them.

3. Managerial Interview Round: The managerial interview might or might not take place. This is because they get your technical skills from the technical interview and the rest they will get from the HR interview only. So, there is a chance that this round will not happen. However, if this round takes place, the questions will be purely managerial questions. Some example questions can be 

  1. Have you ever worked on a team project? If not, why?
  2. How to work in a team?
  3. How do you manage your stress?
  4. What are some excellent principles of working in the software industry?
  5. How do you define success?
  6. What qualities do you think you have that make you different from others?

4. HR Interview Round: This is the last round of the interview process. Again, some managerial questions can be asked in this round too. Some of the example questions that can be asked in this round are as follows.

  1. Are you willing to relocate?
  2. Who is the current CEO of TCS?
  3. Do you have any questions for us?

So, these are the 4 rounds of the TCS NQT exam. Now, let us discuss some Technical Interview Questions asked in the TCS exam for freshers as well as for experienced candidates.

TCS NQT Technical Interview Questions: Freshers and Experienced

1. Name the pillars of Object-Oriented Programming. Is C++ an Object-Oriented programming language? Is C++ a purely object-oriented programming language?

The 4 pillars of object-oriented programming are encapsulation, abstraction, inheritance, and polymorphism. 

  1. Abstraction: Abstraction means hiding the details from the user. For instance, when we build any application, we only let the user interact with it using buttons. We never let the user know what happens behind the clicks of the buttons.
  2. Encapsulation: As the name suggests, this means encapsulating different kinds of data into a single entity. For instance, when we make a class, we encapsulate the data and member functions into that single class.
  3. Inheritance: When a class inherits from another class, it shares the properties of the first class. For example, if we make a Student class, it inherits the class People as a student have all the properties of People like a student walks, talks, etc., and apart from it, the Student has its own properties like enrollment number, subjects, etc.
  4. Polymorphism:: The word “poly” means many and the rod “morph” means form. This means that polymorphism means showing many forms. Polymorphism can be run-time or compile-time. Examples of polymorphism are function overloading and function overriding.

Yes, C++ is an Object-Oriented programming language as we can create classes and objects and C++ can implement all the 4 pillars of OOPS. However, C++ is not a purely object-oriented programming language. This is because a purely object-oriented programming language is such a language where all the functions are written inside a class and there are no primitive data types. Everything is an object in a pure object-oriented programming language.

2. Write a program to swap two numbers. You cannot use a third variable and you cannot use the + (plus), - (minus),* (multiply),/ (divide) operators.

The solution is using the XOR operator. Following is the C++ code for the same.

C++ Program

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

void swap(int &x, int &y) {
	x = x ^ y;
	y = x ^ y;
	x = x ^ y;
}

int main() {
	// Your code goes here;
	int x , y;
	cin >> x >> y;
	
	cout<<"Before swapping, x = " << x <<" y = " << y<<"\n";
	swap(x,y);
	
	cout<<"After swapping, x = " << x <<" y = " << y<<"\n";
	
	return 0;
}

Sample Input:

10 20

Sample Output:

Before swapping, x = 10 y = 20
After swapping, x = 20 y = 10

3. Write a program to perform Binary Search on an array.

The binary search algorithm is used to find an element in a sorted array. It is an optimized searching algorithm as the linear search scans all the elements of the array and the searching time for the linear search thus becomes O(N). However, the searching time of Binary Search is O(log2N). This is because in an average case, only log2N elements of an array are compared. We start by checking the middle element of the array. If the middle element of the array is our answer, we have found the element. If the number that we are searching for is greater than the middle element, it will be on the right half of the array as the array is sorted. So, apply binary search on the right half. If the number that we are searching for is smaller than the middle element of the array, we will apply the binary search on the left half of the array. Following is the C++ program for binary search.

C++ Program for Binary Search

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int binary_search(int arr[], int n,int target) {
	int lo = 0;
	int hi = n-1;
	
	while(lo <= hi) {
		int mid = lo + (hi-lo)/2;
		
		if(arr[mid] == target) return mid;
		else if(arr[mid] < target) lo = mid + 1;
		else hi = mid -1; 
	}
	
	return -1;
}

int main() {
	// Your code goes here;
	int arr[] = {10,12,25,36,42,58,97};
	if(binary_search(arr,7,12) == -1) {
		cout<<"Element was not found";
	} else {
		cout<<"Element was found at index " << binary_search(arr,7,12);
	}
}

Output: 

Element was found at index 1

4. Write a program to find whether a number is even or odd. You are not allowed to use any arithmetic operator i.e. plus (+), minus (-), multiply (*), divide(/), and modulus (%) are not allowed.

An even number in binary form will always have its Least Significant Bit (LSB) = 0. So, if we take the XOR of this number with 1, the answer will become one greater than the number itself. This is because 0 XOR 1 is 1 so, LSB will become 1 from 0 i.e. increment in the value by 1. So, we can say that if a number (N) is an even number then, if N ^ 1 =  N + 1  else the number would be an odd number. So, the C++ program to solve the problem is given below.

C++ Program

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

bool is_even(int N) {
	if((N ^ 1) == N + 1) return true;
	else return false;
}

int main() {
	// Your code goes here;
	int N;
	cin>>N;
	
	if(is_even(N)) cout<<"The number is even";
	else cout<<"The number is odd";
}

Sample Input (Even Number):

10

Output:

The number is even

Sample Input (Odd Number):

9

Output:

The number is odd.

5. What is fragmentation? What does Linked List have to do with it?

We know that when we use arrays, we use sequential memory, i.e. the memory is used contiguously. Now, let us say that we have a large size array and we don’t have that much sequential memory. So, we won’t be able to store that data. Even if the memory is available, it is not available contiguously, but rather in fragments and we are not able to utilize this. This is called fragmentation.

So, we can use a linked list to store the data as it does not require contiguous memory and thus solves the problem of fragmentation. In a linked list, data is stored in a node that also stores the pointer to the next node as the data is not contiguous and the next node can be present anywhere in the memory.

6. List some linear and some non-linear data structures.

  • Linear Data structures: Arrays, Linked Lists, Stacks, Queues, and Dequeues, are all linear data structures.
  • Non-Linear Data structures: The non-linear data structures can further be categorized as circular and non-circular. Some circular data structures are Circular Queue, Circular Dequeue, Circular Linked List, etc. Some non-circular data structures are Trees, Graphs, Priority queues, etc.

7. List some major roles performed by an Operating System.

An operating system performs various roles. Some of the examples are as follows:

  1. Resource Governor: The OS acts as a resource governor so that there is no load on the system. It allocates and deallocates the resources to the processes and also handles the synchronization of these resources among various processes.
  2. Process Management: OS uses various Scheduling algorithms to manage the processes and their execution. This is done to increase the efficiency of the CPU so that it is never idle and the processes keep on executing.
  3. Storage Management: OS acts as a storage manager bus using its File System. The data of the user is stored in the form of files and directories.
  4. Memory Management: Memory management and storage management are confused with each other. However, the storage management concerns the file system and storage of the data in the Computer, the memory management means managing the memory allocation to the processes at the time of execution. Which process should be kept in the Ready Queue, which is in the Waiting Queue (both these queues are inside RAM only).
  5. Privacy and Security: Privacy and security from any threats or viruses are also the responsibility of the OS. However, inter-process security is also the responsibility of the OS.

8. Can we override the private methods?

No, we can’t override the private methods. The private methods are those methods that have a scope only within the same class. Since they cannot be accessed outside the class even by a sub-class, there is no way to override the private methods.

9. List some comparisons and similarities between the Java and C++ programming languages.

Java and C++ are both Object-Oriented Programming languages. However, everything in Java has to be inside a class, whereas this is not the case with C++. C++ has structures that are similar to classes but are used in Procedural Oriented Programming and not Object-Oriented Programming. Java does not have structures. Java has interfaces and C++ does not. Also, in C++, multiple inheritance is supported while it is not supported in Java. 

C++ is fast as compared to Java because C++ is a compiled language, whereas Java is a hybrid language i.e. it is both compiled as well as interpreted. Also, Java uses JVM to run whereas C++ runs directly using the OS. Hence, Java is platform-independent whereas C++ is platform-dependent. 

Java has Wrapper classes for each primitive data type. So, even though Java is not purely Object Oriented, it is possible to write a pure Object-Oriented Program in Java whereas it is not possible to do so in C++.

10. What is DOM?

DOM stands for Document Object Model. It is an API (Application Programming Interface) that is used to access and change the contents of HTML elements. It provides a hierarchical structure of the web page that makes it easy to access the elements, their parents, their siblings and their children.

11. Difference between Process and Thread.

Process Thread
System calls are involved in the Process. There is no system call involved.
OS treats different processes differently. All user-level threads are treated as a single task for the OS.
Different processes have different copies of data, files, codes, etc. There is a Process Control Block (PCB) for each process. Hence, the overhead of the processes is more. Threads store the same copy of data, files and codes. Hence, overhead is low.
Context switching is slow in the case of Processes. It is fast in the case of threads.
Blocking one process will not block another process. Blocking a thread blocks the entire process.
Processes are independent. Threads are interdependent.

12. Difference between user-level thread and kernel-level thread.

User Level Thread Kernel Level Thread
These threads are managed by the User Library. These threads are managed by the Operating System itself.
They are typically fast. The kernel-level threads are slower than the user-level threads.
Context switching is also fast. The Context Switching is slow as compared to the User level threads.
The entire process gets blocked on blocking one thread. If one Kernel thread is blocked, there is no effect on the others otherwise the whole OS can get affected.

13. What is the relation between the pages and frames in the OS?

In OS, paging is the method of dividing each process into small segments called pages and the main memory is also divided into the frames so that each frame can accommodate one data page. Hence, the relation between pages and frames is

Size of page = Size of frame

14. What is TCP/IP Protocol?

TCP stands for Transfer Control Protocol. The TCP is a connection-oriented protocol implemented at the Transport Layer of the OSI Model. TCP is responsible for breaking the data into the form of small frames called framing and later, at the receiver end, it also reassembles the frames back into the sequence to get the data back. 

IP stands for Internet Protocol. It is present at the Network Layer of the OSI model. IP is not reliable and it is a connectionless model. IP is responsible for sending and receiving the data that is broken into the form of frames by the TCP. The IP is combined with TCP to form a reliable data sending-receiving Protocol.

15. Write an SQL query to print the current date.

The SQL Query to print the current date is: GetDate()

16. Write an SQL Query to select all those entries from the table STUDENTS, whose name is “Rahul”.

The SQL Query to do so is

SELECT * FROM STUDENTS WHERE NAME = “Rahul”

17. What do you know about DCL?

DCL means Data Control Language. DCL is responsible for managing the access and permissions to a DBMS. DCL helps in deciding which part of the Database should be accessed by which user. The 2 major commands in DCL are :

  1. GRANT: This command is used to grant privileges to the Objects of the database for a user. It helps one user to grant certain permissions to the other users.
  2. REVOKE: This command is used to withdraw the privileges for the objects of the database that have been granted to a user.

18. Can constructors be overridden?

No, constructors are not overridden. The sub-class constructors have to call the super-class constructor for their creation as they inherit from the super-class. Hence, the constructors cannot be overridden.

19. Do you know why the main() method is static in Java?

The main() method, like every other method in Java, is also inside a class. Now, when we compile or run the Java program, we do not create an object of the class containing the main() method. So, we have to make sure that the main() method can be accessed without creating an object of the main() class. Hence, the main() method is static because the static methods belong to the class and not to a particular object.

20. Write a program to print the right-angled triangle pattern as shown below for any value of N input by the user.

For N = 5

*
**
***
****
*****
Let us observe the pattern carefully. We can see that in the 1st row, there is only 1 star and in the second row, there are 2 stars, and so on. This means that in the ith row, we are printing i number of stars. Following is the C++ program for the same.

C++ Program

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;


int main() {
	// Your code goes here;
	int N;
	cin>>N;
	
	for(int i=1;i<=N;i++) {
		for(int j=1;j<=i;j++) {
			cout<<"*";
		}
		cout<<"\n";
	}
}

Sample Input: 7

Useful Resources

TCS NQT Interview Preparation

Interview Preparation Tips

1.Practice Aptitude

Aptitude is mostly neglected by the students thinking that they can do it easily. Well, the main thing that we need to understand is that in aptitude, Problem-Solving is not the key. Everyone can solve problems using some level of mathematics that they know. However, in Aptitude rounds, it is important that who solves more problems in less time. Hence, speed and accuracy both matter a lot in Aptitude rounds of TCS NQT. Hence, you should practice for aptitude so that your speed increases and you are able to solve more questions faster than others.

2. Revise basics of Programming and OOPS Concepts:

In TCS NQT interviews, the level of difficulty of the programming questions will not be very high. However, it becomes really important to know the programming basics as we usually tend to practice a lot of high-level data structures and algorithmic problems and get stuck when we are asked the basics in the interview. So, whatever your preferred programming language is, you should revise its basics along with the C/C++ basics as they are asked commonly in the TCS NQT Interviews. The OOPS concepts are also very important. You will not be asked to solve a very high-level design problem. Just the knowledge of basic concepts of OOPS should be clear to ace OOPS in the interview.

3. Core Computer Science Subjects should be studied well:

As we have already discussed, the level of questions about data structures and algorithms will not be that high. However, a lot of questions are asked from the core Computer Science subjects like Operating Systems, DBMS (especially SQL), and Computer Networks (CN). So, please make sure to revise them properly before going for the interview,

4. Resume Projects should be well revised:

There can be a lot of discussion on the Projects that you have on your resume. Please note that if the Projects are based on new emerging technologies like IoT (Internet of Things), Machine Learning (ML), Artificial Intelligence (AI), blockchain, etc., it would have a great and positive impact on your interview. You should be prepared with the questions related to these new and emerging technologies if you have such projects. Otherwise, also, you should be completely prepared with all the projects on your resume. Make sure you prepare for the most common questions like: “Why did you use this particular technology”, “What difficulties did you face during this project?”, etc.

5. Work on your Communication Skills

Your communication skills play a major role in the interview. Even if you know the answer to the toughest questions in the interview and you are not able to explain your answer well, it will be a problem for you. Hence, we recommend working on your communication skills. Some basic tips can be followed for improving soft skills. For example, whenever you are revising a portion you studied before, revise it out loud in English as if you are trying to explain it to the interviewer. Mock interviews can be very helpful for improving your soft skills and enhancing your confidence in the interviews.

So, these are the top 5 tips to prepare for the TCS NQT Interview. Prepare well, and all the best !!!

Frequently Asked Questions

1. Is TCS NQT interview tough?

Interviews are not easy or tough. It depends on the level of the alignment of your skillsets with the Job Description. So, TCS NQT Interviews are not tough. They are based on checking the candidate’s problem-solving abilities along with core Computer Science knowledge and communication skills, etc. So, if you prepare well with your basics, you can easily crack the TCS NQT Interview.

2. What is a good score in TCS NQT?

The percentage score that is sufficient to crack TCS NQT will be considered a good score. This differs every year as the number of candidates differs. Hence, we can’t say that a particular score is a good score in TCS NQT. However, you should try to aim for more than 70% in all the sections to level up your chances of selection.

3. How long is the TCS NQT score valid?

The TCS NQT score is valid for 2 years.

4. What is the salary of TCS NQT?

Through TCS NQT, TCS hires for 2 major roles.

  • TCS Ninja: Rs. 3.3-3.6 Lakhs Per Annum
  • TCS Digital: Rs. 7-7.5 Lakhs Per Annum

5. How long is the TCS NQT Interview?

The TCS Ninja interview duration is between 20-30 minutes. However, the TCS Digital Interview is usually longer with a duration of 60-70 minutes, and can even last long to 90 minutes.

6. What is the TCS NQT Eligibility?

The candidates completing their graduation or have completed their graduation from recognized Indian colleges/Universities can apply for the test. The minimum graduation percentage is 60% as so is for classes 10th and 12th. The age limit is from 18-28 years.

Get Placed at Top Product Companies with Scaler Know More 
Get Placed at Top Product Companies with Scaler Know More 
Get Placed at Top Product Companies with Scaler
Sat transparent 640a34d454880bf68e3bfdf33f2389f2214043f59ad18b4c7f7b114e834fb257.svg

Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Personalised feedback report with solutions
Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Real life Interview Questions
Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Identify exact topics to improve

Your feedback is important to help us improve.
Free Mock Assessment
Fill up the details for personalised experience.
All fields are mandatory
Current Employer *
Enter company name *
Graduation Year *
Select an option *
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
Phone Number *
OTP will be sent to this number for verification
+91 *
+91
Change Number
Phone Number *
OTP will be sent to this number for verification
+91 *
+91
Change Number
Graduation Year *
Graduation Year *
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
*Enter the expected year of graduation if you're student
Current Employer *
Company Name *
Please verify your phone number
Edit
Resend OTP
By clicking on Start Test, I agree to be contacted by Scaler in the future.
Already have an account? Log in
Free Mock Assessment
Instructions from Interviewbit
Start Test