CAPGEMINI INTERVIEW QUESTION
CAPGEMINI INTERVIEW QUESTION
CAPGEMINI INTERVIEW QUESTION
o Object
o Class
o Inheritance
o Polymorphism
o Abstraction
o Encapsulation
Object
Any entity that has state and behavior is known as an object. For example: chair, pen,
table, keyboard, bike etc. It can be physical and logical.
Class
Collection of objects is called class. It is a logical entity.
Inheritance
When one object acquires all the properties and behaviours of parent object i.e.
known as inheritance. It provides code reusability. It is used to achieve runtime
polymorphism.
1) What is SQL?
SQL stands for the Structured Query Language. It is the standard language used to
maintain the relational database and perform many different data manipulation
operations on the data. SQL was initially invented in 1970. It is a database language
used for database creation, deletion, fetching and modifying rows, etc. sometimes, it
is pronounced as 'sequel.' We can also use it to handle organized data comprised of
entities (variables) and relations between different entities of the data.
2) When SQL appeared?
SQL first appeared in 1974. It is one of the most used languages for maintaining the
relational database. In 1986, SQL became the standard of the American National
Standards Institute (ANSI) and ISO (International Organization for Standardization) in
1987.
o Data definition language (DDL): It defines the data structure that consists of
commands like CREATE, ALTER, DROP, etc.
o Data manipulation language (DML): It is used to manipulate existing data in the
database. The commands in this category are SELECT, UPDATE, INSERT, etc.
o Data control language (DCL): It controls access to the data stored in the database.
The commands in this category include GRANT and REVOKE.
o Transaction Control Language (TCL): It is used to deal with the transaction
operations in the database. The commands in this category are COMMIT, ROLLBACK,
SET TRANSACTION, SAVEPOINT
The primary key act as a unique identifier for each The unique key is also a unique identifier for records when the prim
record in the table. is not present in the table.
We cannot store NULL values in the primary key We can store NULL value in the unique key column, but only one N
column. allowed.
We cannot change or delete the primary key column We can modify the unique key column values.
values.
What is a Database?
A database is an organized collection of data that is structured into tables, rows,
columns, and indexes. It helps the user to find the relevant information frequently. It is
an electronic system that makes data access, data manipulation, data retrieval, data
storing, and data management very easy. Almost every organization uses the database
for storing the data due to its easily accessible and high operational ease. The database
provides perfect access to data and lets us perform required tasks.
o Software
o Data
o Procedures
o Database Languages
o Query Processor
o Database Manager
o Database Engine
o Reporting
There are some rules of database normalization, which is commonly known as Normal
From, and they are:
Using these steps, the redundancy, anomalies, inconsistency of the data in the
database can be removed.
DATA STRUCTURE
The primitive data structures are primitive data types. The int, char, float, double, and
pointer are the primitive data structures that can hold a single value.
o Linear data structure- A data structure is called linear if all of its elements are arranged
in the sequential order. In linear data structures, the elements are stored in a non-
hierarchical way where each item has the successors and predecessors except the first
and last element.
o Non-linear data structure- The Non-linear data structure does not form a sequence i.e.
each item or element is connected with two or more other items in a non-linear
arrangement. The data elements are not arranged in the sequential structure.
o Static data structure: It is a type of data structure where the size is allocated at the
compile time. Therefore, the maximum size is fixed.
o Dynamic data structure: It is a type of data structure where the size is allocated at the
run time. Therefore, the maximum size is flexible.
Major Operations
The major or the common operations that can be performed on the data structures
are:
.
Advantages of Data structures
The following are the advantages of a data structure:
o Efficiency: If the choice of a data structure for implementing a particular ADT is proper,
it makes the program very efficient in terms of time and space.
o Reusability: The data structure provides reusability means that multiple client
programs can use the data structure.
o Abstraction: The data structure specified by an ADT also provides the level of
abstraction. The client cannot see the internal working of the data structure, so it does
not have to worry about the implementation part. The client can only see the interface.
Advantages of Array
o Array provides the single name for the group of variables of the same type
therefore, it is easy to remember the name of all the elements of an array.
o Traversing an array is a very simple process, we just need to increment the base
address of the array in order to visit each element one by one.
o Any element in the array can be directly accessed by using the index.
Which data structure is used to perform recursion?
Stack data structure is used in recursion due to its last in first out nature. Operating
system maintains the stack in order to save the iteration variables at each function call
What is a Stack?
Stack is an ordered list in which, insertion and deletion can be performed only at one
end that is called the top. It is a recursive data structure having pointer to its top
element. The stack is sometimes called as Last-In-First-Out (LIFO) list i.e. the element
which is inserted first in the stack will be deleted last from the stack
o node data
o pointer to the next node in sequence (next pointer)
o pointer to the previous node (previous pointer).
Define the queue data structure.
A queue can be defined as an ordered list which enables insert operations to be
performed at one end called REAR and delete operations to be performed at another
end called FRONT.
efficient.
• Waterfall model
• Agile model
• Iterative or incremental model
• Spiral model
• V-Shaped model
phase will start only after the completion of the previous one. This process
was being followed for a long time and a traditional approach and has
been the best one since agile is adopted recently. This type of model does
not involve any kind of frequent requirement changes and needs follows
clear documentation from the beginning to the end. The phases and
and the processes being followed in the organization. The five different
(Optimizing).
The drawbacks of the waterfall model are – It will not be ideal for larger
and complex projects when the requirements are not clearly documented
and not clear. It is not easier and also not possible to go back to any stage
or service will be delivered until the last stages or phases of the Software
Development Life Cycle which will be a form of risk. The process of
PALINDROME - A palindrome number is a number that is same after reverse. For example
121, 34543, 343, 131, 48984 are the palindrome numbers.
Type It can be classified into two categories i.e. checked and All errors in Java are unchecked.
unchecked.
Known or Only checked exceptions are known to the compiler. Errors will not be known to the
unknown compiler.
Causes It is mainly caused by the application itself. It is mostly caused by the environment
in which the application is running.
Multithreaded programming a process in which two or more parts of the same process
run simultaneously. ... Explanation: There are two types of multitasking: Process based
multitasking and Thread based multitasking.
Multithreaded programming a process in which two or more parts of the same process
run simultaneously. ... Explanation: There are two types of multitasking: Process based
multitasking and Thread based multitasking.