TCS Interview Questions and Answers

This website contains TCS interview questions with answers. We have given TCS interview questions faced by freshers and experienced in real interviews in TCS Drives. Dear readers, these TCS Interview questions have been specially designed so that you can get acquainted with the nature of the questions you may be ask during your interview.

1. Explain the functionality of linked list?

Answer:-A linked list consists of two parts: information and the link. In the single connected listening, the beginning of the list is marked by a unique pointer named start. This pointer does point to the first element of the list and the link part of each node consists of an arrow looking to the next node, but the last node of the list has null pointer identifying the previous node. With the help of start pointer, the linked list can be traversed easily.


2. How is C different from C++?

Answer:- C++ can be said to be a superset of C. Major added features in C++ are Object-Oriented Programming, Exception Handling and rich C++ Library.


3. What is NAT?

Answer:- Network Address Translation (NAT) is an acronym for Network Address Translation. It involves modifying the IP headers of packets being transported over a traffic routing device to remap one IP address space to another.


4. Explain two integrity rules used in DBMS?

Answer:- Referential integrity rules & Entity integrity rules.
Referential integrity rule states that the database does not contain orphan record foreign key values. In this case, the primary key value cannot be modified if you have used this value as a foreign key in the child table.
In entity integrity rules, you cannot keep the primary key value null.


5. What is polymorphism?

Answer:- In Python, polymorphisms refer to the occurrence of something in multiple forms. As part of polymorphism, a Python child class has methods with the same name as a parent class method. This is an essential part of programming. A single type of entity is used to represent a variety of types in different contexts (methods, operators, objects, etc.)
Polymorphism may be used in Python in various ways. Polymorphism can be defined using numerous functions, class methods, and objects. So, let us deep-dive into each of these ways.


6. What are the four basic principles of OOPS?

Answer:- The four basic principles of Object-Oriented Programming System are listed below:

Abstraction: Abstraction is a process of hiding the implementation details and showing only functionality to the user. For example, sending SMS where you type the text and send the message. You don't know the internal processing about the message delivery.
Abstraction lets you focus on what the object does instead of how it does it. Inheritance: Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object.
Encapsulation: Encapsulation in Java is a process of wrapping code and data together into a single unit, for example, a capsule which is mixed of several medicines.
Polymorphism: Polymorphism in Java is a concept by which we can perform a single action in different ways. Polymorphism is derived from 2 Greek words: poly and morphs. The word "poly" means many and "morphs" means forms. So polymorphism means many forms.


7. What is a static variable?

Answer:- Static variables have a property of preserving their value even after they are out of their scope! Hence, static variables preserve their previous value in their previous scope and are not initialized again in the new scope.


8. What is the difference between a clustered index and non clustered index?

Answer:- A clustered index is a form of index that reorders the physical storage of records in a table, whereas a non clustered index is one in which the logical order of the index does not match the physical storage order of the rows on the disc. Insert and update operations are faster than with a clustered index. Data is physically stored in index order, making it faster to read than non-clustered data.


9. Differentiate structure and arrays.

Answer:- The primary difference between structure and array is as follows:
An array is a data structure. It contains a group of similar data types.
The structure is user define data type. It contains a group of dissimilar data types.


10. What is the software development life cycle?

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





Discussion


* You must be logged in to add comment.