Home Newsroom TCS NQT Interview Questions 2022 | 80+ Important Questions To Help You Ace Your Interview

TCS NQT Interview Questions 2022 | 80+ Important Questions To Help You Ace Your Interview

The TCS National Qualifier Test (TCS NQT) is a multi-level assessment that evaluates the following abilities and competencies:

  1. Entry-level job candidates must be proficient in the key cognitive processes.
  2. Insights and knowledge particular to the industry
  3. Specialization in the abilities required for distinct job functions

TCS NQT: Personal Interview

There are three different types of interview stages in the interview round:

  1. Technical Interview
  2. Management interview
  3. HR Interview

Also Read: Wipro Elite NTH 2022 Interview Questions: Technical & HR Questions For Freshers

TCS NQT Interview: Technical Round Questions

The technical round consists of programming questions and tests your knowledge of programming. You should have a thorough grasp of your core subjects of graduation as well as a few programming languages. Most of these questions are domain-based interview questions.

Q1. Differentiate between Compiler and Interpreter

Interpreter translates just one statement of the program at a time into machine code.

Compiler scans the entire program and translates the whole of it into machine code at once.

An interpreter takes very less time to analyze the source code. However, the overall time to execute the process is much slower.

A compiler takes a lot of time to analyze the source code. However, the overall time taken to execute the process is much faster.

An interpreter does not generate an intermediary code. Hence, an interpreter is highly efficient in terms of its memory.

A compiler always generates an intermediary object code. It will need further linking. Hence more memory is needed.

Q2. Explain the primary difference between C and Python.

The main difference between C and Python is that C is a structure-oriented programming language while Python is an object-oriented programming language. In general, C is used for developing hardware operable applications, and python is used as a general-purpose programming language. To know in detail, click here.

Q3. What are the four basic principles/concepts of OOPS?

Object-oriented programming has four basic concepts: encapsulation, abstraction, inheritance, and polymorphism.

Q4. What do you know about the garbage collector?

Garbage collection in Java is the process by which Java programs perform automatic memory management. Java programs compile to bytecode that can be run on a Java Virtual Machine, or JVM for short. When Java programs run on the JVM, objects are created on the heap, which is a portion of memory dedicated to the program. Eventually, some objects will no longer be needed. The garbage collector finds these unused objects and deletes them to free up memory.

Q5. Define Machine Learning, deep learning & AI.

Artificial Intelligence is the concept of creating smart intelligent machines. Machine Learning is a subset of artificial intelligence that helps you build AI-driven applications. Deep Learning is a subset of machine learning that uses vast volumes of data and complex algorithms to train a model.

Q6. What is Cloud Computing?

Cloud computing is a general term for anything that involves delivering hosted services over the internet. These services are divided into three main categories or types of cloud computing: infrastructure as a service (IaaS), platform as a service (PaaS) and software as a service (SaaS).

Q7. What is a Spanning Tree?

A spanning tree can be defined as the subgraph of an undirected connected graph. It includes all the vertices along with the least possible number of edges. If any vertex is missed, it is not a spanning tree. A spanning tree is a subset of the graph that does not have cycles, and it also cannot be disconnected.

A spanning tree consists of (n-1) edges, where 'n' is the number of vertices (or nodes). Edges of the spanning tree may or may not have weights assigned to them. All the possible spanning trees created from the given graph G would have the same number of vertices, but the number of edges in the spanning tree would be equal to the number of vertices in the given graph minus 1.

A complete undirected graph can have nn-2 number of spanning trees where n is the number of vertices in the graph. Suppose, if n = 5, the number of maximum possible spanning trees would be 55-2 = 125.

Q8. What is a conversion constructor?

Conversion Constructors are constructors that convert types of its parameters into a type of the class. The compiler uses these constructors to perform implicit class-type conversions. These conversions are made by invoking the corresponding constructor which matches the list of values/objects that are assigned to the object.

Q9. What are the different storage classes in C?

There are four different types of storage classes that we use in the C language:

  • Automatic Storage Class
  • External Storage Class
  • Static Storage Class
  • Register Storage Class

Q10. What is a command-line argument?

Command line arguments are nothing but simply arguments that are specified after the name of the program in the system's command line, and these argument values are passed on to your program during program execution.

Q11. What is a dangling pointer? What is the use of a dangling pointer?

Dangling pointer occurs at the time of the object destruction when the object is deleted or de-allocated from memory without modifying the value of the pointer. In this case, the pointer is pointing to the memory, which is de-allocated. The dangling pointer can point to the memory, which contains either the program code or the code of the operating system. If we assign the value to this pointer, then it overwrites the value of the program code or operating system instructions; in such cases, the program will show the undesirable result or may even crash. If the memory is re-allocated to some other process, then we dereference the dangling pointer will cause the segmentation faults.

Q12. Write a Program to print the right triangle star pattern

int main()

{

int i, j, n;

printf("Enter value of n: ");

scanf("%d", &n);

for(i=1; i<=n; i++)

{

/* Print i number of stars */

for(j=1; j<=i; j++)

{

printf("*");

}

printf("\n");

}

return 0;

Q13. What are DDL, DML, and DCL commands in my SQL?

DDL is the short name of Data Definition Language, which deals with database schemas and descriptions of how the data should reside in the database.

DML is the short name of Data Manipulation Language which deals with data manipulation and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE, etc., and it is used to store, modify, retrieve, delete and update data in a database.

DCL is the short name of Data Control Language which includes commands such as GRANT and is mostly concerned with rights, permissions and other controls of the database system. More info…

Q14. What are the characteristics of Big Data Analytics

  1. Velocity
  2. Volume
  3. Value
  4. Variety
  5. Veracity
  6. Validity
  7. Volatility
  8. Visualization

Q15. What is a user-defined exception in Java?

Java user-defined exception is a custom exception created and throws that exception using a keyword ‘throw’. It is done by extending a class ‘Exception’. An exception is a problem that arises during the execution of the program.

Q16. What is the Difference Between DELETE and TRUNCATE?

DELETE is a SQL command that removes one or multiple rows from a table using conditions. TRUNCATE is a SQL command that removes all the rows from a table without using any condition. More in brief.

Q17. Explain types of protocols.

  1. Transmission Control Protocol (TCP)
  2. Internet Protocol (IP)
  3. User Datagram Protocol (UDP)
  4. Post office Protocol (POP)
  5. Simple mail transport Protocol (SMTP)
  6. File Transfer Protocol (FTP)
  7. HyperText Transfer Protocol (HTTP)
  8. HyperText Transfer Protocol Secure (HTTPS)
  9. Telnet
  10. Gopher

Q18. Write a Binary Search program.

Binary Search is a search algorithm that is used to find the position of an element (target value ) in a sorted array. The array should be sorted prior to applying a binary search. Binary search is also known by these names, logarithmic search, binary chop, half interval search.

Q19. What is data abstraction? What are the three levels of data abstraction with example?

Data Abstraction is a process of hiding unwanted or irrelevant details from the end user. It provides a different view and helps in achieving data independence which is used to enhance the security of data.

Mainly there are three levels of abstraction for DBMS, which are as follows −

  • Physical or Internal Level
  • Logical or Conceptual Level
  • View or External Level

For example, when using a cell phone, you can figure out how to answer incoming calls and respond to text messages. Thanks to data abstraction, you can't tell how the phone itself transmits signals. The purpose of data abstraction is to expose only the essential elements of a device.

Q20. What is Memory Alignment?

Alignment refers to the arrangement of data in memory, and specifically deals with the issue of accessing data as proper units of information from main memory

Q21. Explain the functionality of a linked list?

A linked list is a sequence of data structures, which are connected together via links.

Linked List is a sequence of links which contains items. Each link contains a connection to another link. Linked list is the second most-used data structure after array. Following are the important terms to understand the concept of Linked List.

  • Link − Each link of a linked list can store a data called an element.
  • Next − Each link of a linked list contains a link to the next link called Next.
  • LinkedList − A Linked List contains the connection link to the first link called First.

Q22. Explain recursive function & what are the data structures used to perform recursion?

A recursive function can be defined as a routine that calls itself directly or indirectly. Using the recursive algorithm, certain problems can be solved quite easily. Stack is the data structure used to perform recursion.

Q23. Explain the difference between ‘operator new’ and the ‘new’ operator?

The operator merely allocates memory, it does not initialize it. Whereas the new operator also initializes it properly by calling the constructor.

Q24. Write a Program to print the Half Pyramid Number Pattern

void main()

{

int i, j, rows;

printf (" Enter a number to define the rows: \n ");

scanf("%d", &rows);

printf("\n");

for (i = 1; i <= rows; ++i) // outer loop

{

for (j = 1; j <= i; ++j) // inner loop

{

printf ("* "); // print the Star

}

printf ("\n");

}

getch();

}

Q25. Const char *p, char const *p What is the difference between the above two?

  • const char* p is a pointer to a const char.
  • char const* p is a pointer to a char const.

Since const char and char const are the same, it's the same.

Q26. Which programming language would you prefer using if given a choice- C, Java, Python?

For security, graphics, apps java is better. In fact Java is better for any case if you want a good processing power or want to do graphics intensive stuff. So, I would prefer Java.

Q27. What is a Hash Query?

A query string hash (QSH) is an important technique to prevent URL tampering and secure HTTP requests when they are made via a browser.

Q28. Write a program in C to swap two numbers without using a third variable. Explain its programming logic.

int main()

{

int a=10, b=20;

printf("Before swap a=%d b=%d",a,b);

a=a+b;//a=30 (10+20)

b=a-b;//b=10 (30-20)

a=a-b;//a=20 (30-10)

printf("\nAfter swap a=%d b=%d",a,b);

return 0;

}

Q29. What are WPF and WCF?

WCF deals with communication (in simple terms - sending and receiving data as well as formatting and serialization involved), WPF deals with presentation (UI).

WPF provides a unified framework for building applications and high-fidelity experiences in Windows Vista that blend application UI, documents, and media content. WPF offers developers 2D and 3D graphics support, hardware-accelerated effects, scalability to different form factors, interactive data visualization, and superior content readability.

WCF is Microsoft’s unified programming model for building service-oriented applications. It enables developers to build secure, reliable, transacted solutions that integrate across platforms and interoperate with existing investments.

Q30. Differentiate between virtual function and pure virtual function.

A virtual function is a member function of base class which can be redefined by derived class. A pure virtual function is a member function of base class whose only declaration is provided in base class and should be defined in derived class otherwise derived class also becomes abstract.
Classes having virtual functions are not abstract.

Base class containing pure virtual function becomes abstract.

Q31. What is data abstraction?

Data abstraction is the reduction of a particular body of data to a simplified representation of the whole. Abstraction, in general, is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.

Q32. Differentiate between clustered index and non-clustered index.

Clustered index is created only when both the following conditions satisfy – 

  1. The data or file that you are moving into secondary memory should be in sequential or sorted order.
  2. There should be a key value, meaning it can not have repeated values.

Non-Clustered Index is similar to the index of a book. The index of a book consists of a chapter name and page number, if you want to read any topic or chapter then you can directly go to that page by using the index of that book. No need to go through each and every page of a book.

Q33. What is the difference between foreign keys and reference keys?

The foreign key is used to connect the secondary table to the primary table. A reference key is a primary key that is mainly used to create column level constraints

Q34. What is a Database Management System?

A database management system (or DBMS) is essentially nothing more than a computerized data-keeping system. Users of the system are given facilities to perform several kinds of operations on such a system for either manipulation of the data in the database or the management of the database structure itself.

Q35. What are conditional statements?

Conditional statements are those statements where a hypothesis is followed by a conclusion. It is also known as an " If-then" statement. If the hypothesis is true and the conclusion is false, then the conditional statement is false.

Q36. Define Joins, Views, Normalization, Triggers.

Join actually puts data from two or more tables into a single result set.

A relational database is basically composed of tables that contain related data. The process of organizing this data into tables is actually referred to as normalization.

Triggers are basically used to implement business rules. Triggers is also similar to stored procedures. The difference is that it can be activated when data is added or edited or deleted from a table in a database.

If we have several tables in a db and we want to view only specific columns from specific tables we can go for views. It would also suffice the needs of security, sometimes allowing specific users to see only specific columns based on the permission that we can configure on the view. Views also reduce the effort that is required for writing queries to access specific columns every time.

Q37. What is the software development cycle?

Software Development Life Cycle (SDLC) is a process used by the software industry to design, develop and test high quality software. The SDLC aims to produce high-quality software that meets or exceeds customer expectations, reaches completion within time and cost estimates.

Q38. Differentiate between classes and interface.

A class can be instantiated i.e, objects of a class can be created.

An Interface cannot be instantiated i.e, objects cannot be created.

Classes do not support multiple inheritance.

Interface supports multiple inheritance.

Q39. What is polymorphism?

Polymorphism is one of the core concepts of object-oriented programming (OOP) and describes situations in which something occurs in several different forms. In computer science, it describes the concept that you can access objects of different types through the same interface.

Q40. What is Inheritance?

Inheritance in Java is a mechanism in which one object acquires all the properties and behaviours of a parent object. It is an important part of OOPs (Object Oriented programming system).

The idea behind inheritance in Java is that you can create new classes that are built upon existing classes. When you inherit from an existing class, you can reuse methods and fields of the parent class. Moreover, you can add new methods and fields in your current class also.

Inheritance represents the IS-A relationship which is also known as a parent-child relationship.

TCS NQT Interview: Management Round Questions 

The management round interview tests your leadership skills and requires you to give detailed answers to the various questions asked.

S.No. Questions
1. What would you do if you were assigned to a team that was riven by internal strife? 
2. What will you do if your project's deadline is abruptly pushed back?
3. What distinguishes you from the rest of the pack?
4. If you're on a boat with your wife and father and the boat starts to sink, who do you think you'll save?
5. What criteria should I use to evaluate you before entrusting you with any project?
6. How do you plan to lead a group of trainees?
7. What would you do if your supervisor repeatedly criticised your work?
8. What does success mean to you?
9. Are you more at ease working in a group or prefer to work alone?
10. What if your selected location isn't available?
11. Describe a situation where you were asked to do something you do not like?

TCS NQT Interview: HR Interview Round Questions

This round consists of questions that test the personality of the candidates i.e., their characters and traits which help to find whether the candidate is suitable and in accordance with TCS's work culture.

S.No. Questions
1. Tell me something about yourself.
2. Tell me something about your family.
3. What are your strengths and weaknesses?
4. Do you have any backlogs in your graduation?
5. Why do you want to join TCS despite the fact that you have several job offers?
6. What did you do to prepare for this interview, and did you get any help?
7. Do you mind working night shifts and are you willing to relocate?
8. Tell me something about yourself that your resume doesn't mention.
9. Where do you see yourself in 5 years?
10. Have you ever effectively led a team or a large group of people?
11. Why do you want to work at TCS?
12. Why do you want to work in the IT sector?

 

You might also be interested in reading:

  1. Advantages And Disadvantages of Java: Analyze The Pros And Cons
  2. Failing Coding Interviews? Get inside tips on how to crack interviews in to companies
  3. An A to Z guide to crack interviews
  4. Recruitment process of Intuit, Walmart, Myntra, TCS, Juspay, Infosys, Accenture and many more (all at one place!)
  5. 3 major red flags to watch out for, while giving an Interview
TAGS
Interview Preparation
Updated On: 27 Mar'22, 09:38 PM IST