TCS Interview Questions - GeeksforGeeks

Introduction

Before diving into the important TCS interview questions & answers, let us understand more about the organization!

TCS (Tata Consultancy Service) is one of the top renowned Indian multinational companies that provide consultancy service, information technology, and business solutions worldwide. It is considered a global leader in the field of information technology.

The company’s headquarters is in Mumbai. The company operates its business in 46 countries all over the world.

The company has a good reputation and is considered one of the most trusted Indian brands worldwide. As per the latest report generated by Brand Finance, the leading brand valuation firm globally, Tata Consultancy Service is now the second most valuable brand.

Some Important Stats About TCS

In 2015, in the most innovative companies ranking list of the world,  published by Forbes, it gained 64th position overall, making it both the highest-ranked IT services company and the top Indian company. TCS was featured at 10th position in the Fortune India 500 list in 2015. In April 2018, it became the first Indian IT company to cross $100 billion market capitalization.

In 2021, it was at the No. 3 position, after IBM. According to the reports, until Mar 2022, the market capitalization of Tata Consultancy Services is around $171.23 Billion, making it one of the largest companies.

According to credible statistics, approx 70% of the dividend of Tata Sons is generated by Tata Consultancy Service.

The business model and strategy of TCS are so effective that its relationship with customers has always been deep and ensuring. Its highly energetic workforce, steady and timely expansion of business, strong market reputation, and proven history of continuously delivering longer-term stakeholder value make this company different from the others. With so much history and reputation in the market, everyone wants to work at TCS. For this reason, we have compiled a list of TCS interview questions that you can prepare.

TCS Interview Questions For Beginners & Experienced
1. What is the functionality of a Linked List?
A linked list is a type of linear data structure. In that input data is not stored sequentially in the computer memory; the input data is stored randomly inside the computer’s memory. The stored data inside the computer memory are linked with each other with the help of address. With the help of address, input data can be fetched from the computer memory as output, exactly like input, in sequential order.

Let’s understand in another way what a linked list is.

A linked list can be defined as a collection of nodes. Each node is divided into two parts, where, in the first part, data is stored, and in the second part, the address of the next following node is stored. It keeps on continuing till the last node of the linked list. The last node contains null in the address part means no nodes are ahead in the sequence. Each node’s assigned address means the physical location in the computer memory, and these addresses are random. In the programming language term, the first part is called the data part, and another one is called the next.

The linked list starts with a start node that is called a pointer, it contains the address of the first node and its function to give start to the linked list, but the last node of the list has a null pointer identifying the previous node. With the help of a start pointer, the linked list can be traversed easily.

2. What are the basic principles of OOPS?
This is one of the most common TCS interview questions. The Object-Oriented Programming System has the following four basic principles:

a) Abstraction
Abstraction is the concept of hiding unnecessary information from the users and showing only functionality to the users.

Let’s understand it with the example of sending an email. You type the message and send it to the addressee. Now, what internal processes take place in the delivery of the message, you don’t know. Abstraction allows you only to know the object’s function instead of how the object functions.

b) Inheritance
Inheritance in Java can be defined as a system in which a parent object’s properties and behaviors are acquired by one object.

c) Encapsulation
In Java, the wrapping up process of code and data into a single unit is known as Encapsulation. In other words, Encapsulation can be defined as a proactive shield that provides a safeguard to the data from being accessed by the code outside the shield. The one class of data inside the protecting shield can not be accessed by the other data class outside the shield.

d) Polymorphism
Polymorphism in Java can be defined as a concept by which we have multiple ways to perform a single action.

Polymorphism combines two Greek words, “Poly and Morphs. Poly means many and morphs mean forms, and the English meaning of the combination of both poly and morphs becomes “many forms”.

3. What Do You Understand About Inheritance In Java?
The Classes based mechanism is termed Inheritance in Object-Oriented Programming.

It is the process by which the data members and properties of the parent class are inherited to a child class. The class obtained by the process is called a sub-class or a child class, whereas the source class from which the child-class is obtained is called superclass or parent class.

4) Define Polymorphism?
Polymorphism is one concept in object-oriented programming that means having many forms. In simple terms, Polymorphism allows an object to have many forms in OOP. It is used most commonly in OOP at the time when in order to refer to a child class object, a parent class reference is used.

By Polymorphism, different actions can be performed in different ways. There are two types of Polymorphism in OOP.

Method Overloading: Method overloading can be defined as one type of manner in which the behaviour of the methods is dependent on the basis of their argument types and the number of the arguments.
Operator Overloading: Operator loading in computer programming is sometimes termed as “ad hoc polymorphism”. It is a specific case of polymorphism where different operators use different implementations on the basis of arguments they have. Operator loading can be defined by a programming language, a programmer, or both.
5) List The Different Types Of Inheritance?
The different types of Inheritance are as follows:

Single inheritance
Multiple Inheritance
Multi-level Inheritance
Multi-path Inheritance
Hierarchical Inheritance
Hybrid Inheritance
6) Explain The difference between classes and interfaces?
The differences between classes and interfaces are enumerated in the succeeding paragraphs.

Objects of a class are created in order to instantiate that class. In contrast, instantiation is not possible in the interface case because of all its abstract methods that do not perform any action. So instantiating an interface is of no use.

A class is created using class keywords, whereas an interface is created using the interface.

The members of the class, such as its instance variables or methods, can have access specifiers. The entities provided by Java help us restrict the scope or visibility of a package, class, constructor, methods, variables, or other data members. These access modifiers are also called “Visibility Specifiers”. With access specifiers, members of a class can be restricted to access or hidden from the other classes. On the other hand, the interface is used to derive another class, so, all its members are declared as public, and that is why the members of the interface can not have access specifiers.

In the class, the methods are defined to perform some actions on the declared fields, whereas the interface can only have abstract methods that don’t require implementation for its declaration.

A class can implement any number of the interface, but it can only extend one superclass. At the same time, interfaces can access any number of interfaces but can not perform any interface.

The purpose of a constructor inside a class is to initialize the object’s fields, whereas there are no fields inside the interface to initialize. That is the reason why the interface does not have any constructor.

7. Explain Software Development Life Cycle
Software Development Life Cycle (SDLC) is a process in which systematic steps are taken by the development team of the software industry in the phases of design, development, testing, and maintenance of softwares so that the high-quality softwares can be produced. It involves meeting the customers’ satisfaction and completion of the development of software within a time frame with controlled cost.

8) What Do You Understand By Normalization of Databases, Joins, And Keys?
In a normalizing process, data is organized in a database efficiently. The normalization process works to achieve two goals.

Elimination of redundant data (same data stored in multiple tables)

To ensure data dependencies make sense (only related data is stored in a table)

Both these goals play an essential role in ensuring that the consumption of the amount of space used by a database is reduced and data is stored logically.

9) Define Loops
Loop can be defined as a sequence of instructions created in a program structure to execute a block of the statement (s) repeatedly with a fixed number of times depending upon the conditional statement. In the conditional statement, conditions are defined as “true or false”, and execution checks these conditions for successful completion. If the condition is “true” then execution occurs, and if the condition is “false,” execution is terminated.

10) Describe Joins, Views, Normalization, Triggers?
Join keyword is one of the features of the Structured Query Language. It is used at the time to query data from more than one table. The query is based on a relationship between specific columns in these tables. In databases, the tables are often related to each other using keys.

Types of Joins
INNER JOIN
FULL JOIN
LEFT JOIN
RIGHT JOIN
A View is one of the essential key features of Structured Query Language.

It is the kind of virtual table that looks exactly like a real table and has rows and columns in the same manner as a real table. It contains the stored query results that are displayed when requested by users and can be called up-to-date information.

Normalization is a process by which the relationship between data is structured and handled to keep redundancy minimal in the relational table and prevent the database from unnecessary anomalies like insertion, update and delete. These anomalies occurred due to redundancy in the database’s information.

In this process, large database tables are divided into small tables, establishing relationships. It helps remove redundant data and provides ease in addition, manipulation, or deletion of table fields.

A normalization establishes guidelines to determine whether a relational table satisfies the normal form.

A normal form is a process by which each relation against the given criteria is evaluated and the multivalued, joins, functional and trivial dependency from a relation is removed.

Updation, insertion, or deletion of any data does not create any problem for database tables, and thus integrity and efficiency of the relational table are improved.

A trigger can be defined as a procedure stored in a database that invokes automatically in the case when a special event, such as insertion of a row into a specified table, updation of columns of specific tables, etc., occurs in the database.

11) List Out Different Advantages of DBMS
The list of several advantages of DBMS is as follows:

Better data sharing
Better data security
Improved data integration
Effective data access
Enhanced end-user productivity
Improvised decision making
Minimal data inconsistency
12) Define Database Management System
A Database Management System is one type of software designed primarily to create and manage databases. With the help of DBMS, end users can build and maintain any database. An interface is provided by the DBMS between the end-user/application and the databases.

13) Describe Database Schema?
The function of a database schema is to represent the logical configuration of a relational database, in a partial or complete. Its existence can be in the form of visual representation or as a series of formulas known as integrity constraints that control a database. A data definition language, such as SQL is used to express these calculations.

14) State The Difference Between The Foreign Key And Reference Key
The use of the foreign key is to connect the secondary table to the primary table. At the same time, a reference key is a primary key used at the time of the creation of column level constraints. With the help of a reference key, the database can connect two whole tables with a common constraint.

15) What are the conditional statements?
The conditional statements called conditional expressions are a set of rules that are executed when a particular condition is found true.

The conditional statements are also known as if-then statements, where the statement is executed when the condition is true.

16) Compare the Structure of Bitmap And the b-tree Index
This is one of those TCS interview questions, that when answered correctly, will leave the interview impressed.

b tree

It is made with the combination of branch nodes and leaf nodes where the function of branch node is to hold prefix key value along with the link to the leaf node, and the leaf nodes hold the indexed value and rowed.

Bitmap

Every single distinct value is represented by a single bit. It swiftly locates rows in a table using a string of bits, and it is used to index columns with low cardinality.

17) Define Array
Generally, an array is a collection of elements of a similar type, and its elements are stored in contiguous memory locations. It is one type of data structure where similar elements are stored, and only a fixed set of elements can be stored in a Java array. It is index-based, and the first element is stored at 0 indexes, the second at the first index, and so on.

18) What is Virtual Function and Pure Virtual Function?
Virtual Function

The function in the base class is declared as virtual to achieve Polymorphism in object-oriented programming. The virtual function is also known as the virtual method. A virtual function or method’s behavior can be overridden within an inheriting class by a function with the same signature to provide the polymorphic behavior.

Pure Virtual Function

A pure virtual function is a base class member function declared in the base class and implemented in the derived class. Pure virtual functions are included only in the abstract classes.

19) Explain the difference and similarities between C and C++
Similarities
Syntax in both languages is similar.
The code structure is the same in both languages.
Both the languages have the same compilation.
The basic syntax is the same.
Most operators and keywords of the C language are also used in C++ and have the same function.
Basic grammar for both languages is the same.
Both languages’ primary memory model is very close to the hardware.
Both the languages have the same notions of the stack, heap, file-scope, and static variables.
Differences
C is not object-oriented programming and hence does not support Polymorphism, Encapsulation, and Inheritance, whereas C++ supports Polymorphism, Encapsulation, and Inheritance because it is an object-oriented programming language.
C is called a subset of C++, whereas C++ is known as a superset of C.
C and C++ contain 32 keywords and 63 keywords, respectively.
C supports procedural programming for code development, but C++ is a hybrid language because it supports procedural and object-oriented programming languages.
Data and functions are separated in C and C++. Data and functions are encapsulated together in the form of an object.
C is a function-driven language, whereas C++ is an object-driven language because it is object-oriented programming.
Built-in data types are supported in C, whereas Built-in & user-defined data types are supported in C++.
C doesn’t support function and operator overloading, whereas these both are supported by C.
In the structures of C, functions are not defined, whereas, in C++, functions can be used inside a structure.
C doesn’t have namespace features, but C++ has.
C does not support Inheritance, whereas C++ supports Inheritance.
Reference variables are not supported by C but are supported by C++.
C structures don’t have access modifiers, whereas C ++ structures have access modifiers.
Virtual and friend functions are not supported by C, whereas C++ supports virtual and friend functions.
C focuses on method or process, and C++ focuses on data.
scanf() and printf() functions are used for input/output in C whereas cin and cout functions are used for input/output in C++.
Header file used by C is stdio.h. whereas the Header file used by C++ is iostream.h.
C provides malloc() and calloc() functions for dynamic memory allocation and free() for memory deallocation, whereas C++ provides a new operator for memory allocation and delete operator for memory deallocation.
20) Define WPF And WCF
WPF

Windows Presentation Foundation (WPF) is a free and open-source graphical subsystem, similar to WinForms.

Microsoft initially developed it to render user interfaces in Windows-based applications. Previously it was known as “Avalon” and was initially released as part of “. NET Framework 3.0” in 2006. WPF deals with presentation (UI)

The use of WPF is to build Windows client applications that run on Windows operating systems. Irs frontend language is XAML, and backend language is C#.

WCF

Windows Communication Foundation (WCF) is a framework known for building service-oriented applications. It deals with communication, and with WCF, data can be sent in the form of asynchronous messages from the endpoint of one service to another service. Sending and receiving data, formatting, and serialization, all these functions are included in the activities of WCF. WCF is being used to replace all earlier web service technologies from Microsoft. Web services provided by WCF are one aspect of a much larger set of remote communication capabilities enabled by WCF.

[“source=mygreatlearning”]