Real Interview Questions Asked In TCS
- What is Array?
- Give Some Examples Of OS?
- What Is Namespace?
- Explain Operator Overloading?
- Define Class & Object
- What is the difference between c and c++
- Oops, What is abstraction?
- What is polymorphism?
- What is encapsulation?
- What is printf()?
- Benefits of abstraction?
- Can you run the c program without main()?
- About What project have you done?
- What languages have you used in your project?
- Java: What are exceptions?
- Explain try-catch block.
- Explain throws exception.
- Parent class of all exceptions.
- What is inheritance?
- Does java support multiple inheritances?
- Difference between abstract class and interface.
- Why is method overriding called dynamic polymorphism?
- What is static binding? What is a destructor?
- Does java support destructor?
- Did you do any other courses?
- What do you know about machine learning?
- Difference between artificial intelligence and machine learning.
- What is cloud computing?
- What is IoT?
- What is SDLC?
- What do you know about cybersecurity?
- Have you participated in any hackathons or CodeChef competitions?
- Explain the functionality of the linked list?
- What are the four basic principles of OOPS?
- What is inheritance?
- What is the way of inheriting the variable of one class to any other class? …
- What is Polymorphism?
- What are the different types of inheritance?
1) Explain the functionality of linked list.
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) What are the four basic principles of OOPS?
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.
3) What is inheritance?
In, Object-Oriented Programming, inheritance is a mechanism based on classes.
Inheritance refers to inhering the data members and properties of a parent class to a child class. A class which is derived from another level is often called as a sub-class or a child class, and the type from which the child class is obtained is known as super-class or parent class.
5) What is Polymorphism?
Polymorphism is a concept in OOPS which means having many forms. In simple words, it means that different actions will be performed in different instances. Polymorphism is of two types:
- Method overloading
- Operator overloading
6) What are the different types of inheritance?
Types of Inheritance:
- Single inheritance
- Multiple Inheritance
- Multi-level Inheritance
- Multi-path Inheritance
- Hierarchical Inheritance
- Hybrid Inheritance
7) What is the difference between classes and interface?
The differences between classes and interfaces are listed below:
- A class can be instantiated by creating its object, whereas interfaces cannot be instantiated as all the methods in the interface are abstract and do not perform any action, so there is no use of instantiating an interface.
- A class is declared using class keyword whereas an interface is declared using interface keyword.
- The members of the class can have access specifier such as public, protected, and private but members of the interface can not have the access specifier, all the members of the interface is declared as public because the interface is used to derive another class. There will be no use to access specifies inside the members of an interface.
- The methods inside the class are defined to perform some actions on the fields declared in the class whereas interface lacks in asserting in areas, the ways in an interface are purely abstract.
- A class can implement any number of the interface but can only extend one superclass. Whereas interface can reach any number of interfaces but cannot perform any interface.
- A class can have a constructor defined inside the class to declare the fields inside the class, whereas interface doesn’t have any constructor defined because there are no fields to be initialized.
8) What is software development life-cycle?
Software development life-cycle is steps involved in the life cycle of software development phase. Generally, it is followed by the development team which develops the software in the organization. It consists of a clear explanation of developing and maintaining the software.
9) What is normalization of databases, joins, and keys?
Normalization is process of organizing data in a database efficiently. Two goals of the normalization process are: to eliminate redundant data (for example, storing the same data in more than one table) and also ensure data dependencies make sense (only storing related data in a table). These both are important as they reduce the amount of space a database consumes and ensure that data is logically stored.
10) What are loops?
Loops are used to execute block of statement several times in a program depending upon the conditional statement. The basic structure of a circuit is given above in the diagram. For each successful execution of the loop, the conditional statement should be checked. If the conditional statement is true, then the circuit will be executed. If the conditional statement is false, then the course will be terminated.
11) Explain about Joins, Views, Normalization, Triggers?
The JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between specific columns in these tables.
Tables in a database are often related to each other with keys.
A view is a virtual table. A look contains rows and columns, just like a real table. The fields in a picture are fields from one or more real tables in the database.
You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table.
12) List different advantages of DBMS
Improved data sharing.
The list of several advantages of DataBase Management System:
- Improved data security.
- Better data integration.
- Minimized data inconsistency.
- Improved data access.
- Improved decision making.
- Increased end-user productivity.
13) What is Database Management System?
A DataBase Management System is a software system used for creating and managing databases. DBMS make it possible for the end user to build and maintain databases. DBMS provides an interface between the end user/application and the databases.
14) What is database Schema?
The formal definition of the database schema is a set of formulas (sentences) called integrity constraints imposed on a database.
15) What are the conditional statements?
The conditional statements can alternatively be called as conditional expression also. Conditional comments are the set of rules which were executed if a particular condition is true. It is often referred to an if-then statement because if the state is true, then the statement is executed.
16) What is the difference between the foreign key and reference key?
Reference Key is the primary key that is referenced in the other table (linked via the other tables Foreign Key). Foreign Key is how you connect the second table to the primary tables Primary Key (or Reference Key).
17) What is the difference and similarity between C and C++?
C++ has classes whereas C did not have classes.
C does not support function overloading. In C, for input or output, we use functions like gets(), puts(), scanf(), printf(), etc
C does not support exception handling.
18) The structural difference between bitmap and b-tree index?
It is made of branch nodes and leaf nodes. Branch nodes hold prefix key value along with the link to the leaf node and the leaf nodes contain the indexed value and rowed.
It consists merely of bits for every single distinct value. It uses a string of bits to locate rows in a table quickly. It is used to index low cardinality columns.
19) What is the difference between a Clustered index and non-clustered index?
- Only one per table
- Faster to read than non clustered as data is physically stored in index order
- Can be used lot of times per table
- Quicker for insert and update operations than a clustered index
20) Diffrentiate between socket and session?
Socket is the Combination of IP address and Port Number (in pairs)
The session is a Logical Connectivity between the source and destination.
21) What is an array?
An array is a collection of similar elements. For an array, the necessary condition is that the data type of all the elements in the array must be same. The declaration of an array in C++ is as follows:
This defines an array whose name is a and has ten elements from index 0-9
23) Define Data Abstraction. What are their importance?
Abstraction is process of recognizing and focusing on essential characteristics of a situation or object and leaving/filtering out the unwanted components of that situation or object.
Abstraction is the basis for software development. It’s through this concept we define the essential aspects of a system. The process of identifying and designing the ideas for a given system is called Modeling ( objectmodeling).
Three levels of data abstraction are:
- Logical level: Information stored in the database. e.g., Database administrator
- Physical level: Where data is stored physically in the database.
- View level: End users always work on view level. If any amendment is made it may be saved by another name.
25) Memory Allocation in C/C++
The calloc() function allocates a memory area; the length will be the product of its parameters (it has two settings). calloc fills the memory with ZERO’s and returns a pointer to the first byte. If that fails to locate enough space, it returns a NULL pointer.
A malloc() function allocates a memory area; length will be the value entered as parameter. (it has one parameter). It does not initialize memory area
The free() function is used to free the allocated memory(allocated through the calloc and malloc), in other words, this used release the allocated memory
new also used to allocate memory on the heap and initialize the memory using constructor
delete also used release memory allocated by new operator
- Accenture Mega Hiring Freshers 2024 | BCA MCA & Engineering | All Details
- Cognizant Hiring Freshers | Engineer Trainee Role | All Details
- Deloitte OTN Hiring 2024 | College Freshers
- L&T Off Campus drive 2023 Multiple Roles for Freshers
- Tech Mahindra Off Campus Drive 2023 | Software Engineer | Apply Now