Capgemini Recruitment 2023: Commonly Asked Interview Questions - IQCode

About Capgemini

Capgemini is a leading global provider of consulting, digital transformation, technology, and engineering services. With a strong 50-year heritage, Capgemini is at the forefront of innovation in cloud, digital, and platforms, helping businesses worldwide to transform and manage their operations using technology. As a responsible and diversified organization, Capgemini has around 290,000 team members in approximately 50 countries, trusted by its clients to address their entire business needs, from strategy and design to operations.

When you join Capgemini India, you become part of a dynamic organization and a worldwide community of free-thinkers, entrepreneurs, and industry experts. Capgemini India is determined to utilize technology to rethink what is possible and transform the world's most successful companies. Here, professionals work together to bring innovation to life, cultivate exceptional careers, and deliver personal and sustainable growth.

If you have the desire, talent, and aptitude to work with cutting-edge technology, Capgemini is the right place for you. Please find the eligibility criteria below.

Eligibility Criteria

Candidates must meet all of the following criteria:

* Candidates must have scored 60% or higher in Diploma, Graduation, and MCA/ME/MTech. * There are no percentage criteria for SSC and HSC scores. * The interview process is open to all branches of BE and BTech. * ME/MTech students must be from Information Technology, Information Science, or Computer Science only. * Candidates should not have any outstanding backlogs. * Only those candidates who have been shortlisted for further rounds will be eligible.

Capgemini Recruitment Process

Interview Process:

The recruitment process details will be shared with the eligible candidates.

CAPGEMINI Technical Interview Questions for Freshers and Experienced

/* Here is an answer to the first question */

It is recommended to use a Database Management System (DBMS) because it provides a structured way to store and manage data. Some of the primary advantages of using a DBMS include:

  • Centralized data management: A DBMS makes it easier to manage data in one central location, rather than scattered across different file systems
  • Data security: A DBMS can provide mechanisms for securing data by controlling who has access to data and what kind of access they have
  • Data integrity: DBMS can enforce rules that ensure data is consistent and accurate across all users and applications using the database
  • Data backup and recovery: DBMS can provide facilities for backing up data and restoring it in case of data loss or system failure

Why is Normalization Necessary in Database Design?

Normalization is a crucial step in designing a database that ensures data integrity and accuracy. It removes redundant data and minimizes data inconsistencies, which saves storage space and streamlines data maintenance. Normalization helps to avoid data anomalies and dependency issues that occur during database update operations. By organizing data into multiple tables and applying normalization rules, we can reduce data redundancy and minimize data inconsistencies that could arise due to insert, update or delete operations. Therefore, normalization is fundamental to creating efficient, more manageable, and scalable database systems.

Difference Between UNION and UNION ALL in SQL

UNION and UNION ALL are used to combine results of two or more SELECT statements in SQL. The main difference between them is that UNION removes duplicates, while UNION ALL includes all rows, even if there are duplicates.

Here is an example of using UNION:

SELECT column1 FROM table1
SELECT column1 FROM table2;

This will return distinct values of column1 from both table1 and table2.

Here is an example of using UNION ALL:

SELECT column1 FROM table1
SELECT column1 FROM table2;

This will return all values of column1 from both table1 and table2, including duplicates if there are any.

Difference Between dataset.clone() and dataset.copy()

In Python, the `clone()` and `copy()` methods are used to create a copy of an existing dataset.

The `clone()` method creates a shallow copy of the dataset, which means that any changes made to the original dataset will also affect the cloned dataset. The cloned dataset is simply another reference to the same memory location as the original dataset.

On the other hand, the `copy()` method creates a new and independent copy of the dataset. Any changes made to the original dataset will not affect the copied dataset, and vice versa.

In summary, use `clone()` when you want to create a copy of a dataset that you plan on modifying, and use `copy()` when you want to create a completely separate copy of the dataset.

Difference Between getch() and getche() in C Programming

In C programming, getch() and getche() are both used to read a character from the console. However, there is a difference between them.

getch() reads a character from the console, but the typed character is not displayed on the screen, whereas getche() reads a character from the console and displays it on the screen at the same time.

Here is an example code that illustrates the difference between the two functions:

#include <stdio.h>
#include <conio.h>

int main() {
    char ch;

    printf("Enter a character: ");

    ch = getch(); // the character is not displayed
    printf("\nYou entered: %c\n", ch);

    printf("Enter another character: ");

    ch = getche(); // the character is displayed
    printf("\nYou entered: %c\n", ch);

    return 0;

In the above code, when you enter a character using getch(), it is not displayed on the screen. When you enter a character using getche(), it is displayed on the screen.

Overview of #pragma directive

The #pragma directive is a preprocessor directive in C/C++ programming languages used to provide additional information to the compiler. It is used to enable compiler-specific features, to define implementation-specific behavior, or to generate compiler warnings.

Pragma directives are not part of the C/C++ core language. They are compiler-specific and may differ from one implementation to another.

Here is an example of the #pragma directive:

#pragma warning(disable:4996)

This specific #pragma directive disables the warning with code number 4996 in the Microsoft Visual C++ compiler.

Overall, the #pragma directive is a useful tool for controlling the behavior of the compiler and improving the efficiency of the development process.

Which structure is used to connect a C program and the operating system?

In order to connect a C program and the operating system, the structure used is commonly known as a system call. A system call is a function call that is used to request services from the operating system on behalf of the user program. Examples of system calls include opening and closing files, creating processes, and allocating memory. System calls provide an interface between a C program and the operating system, allowing the program to take advantage of the resources provided by the system.

Disadvantages of scanf() and how to avoid them

The scanf() function in C programming language is commonly used to read input from the user. However, there are some drawbacks to using scanf() that can lead to unexpected behavior in your program.

One of the main drawbacks is that it does not handle errors well when reading input. If the user enters an invalid input, scanf() will simply return an error code and your program will continue to execute. This can result in unpredictable behavior and cause your program to crash.

To avoid this, you should always check the return value of scanf() to ensure that the input was read successfully. You can use a loop to keep prompting the user for input until a valid input is received.

Another drawback of scanf() is that it does not handle input buffering well. If the user enters more characters than expected, scanf() will read only the number of characters specified and leave the rest in the input buffer. This can cause problems when reading input later on in your program.

To avoid this, you can use the fgets() function to read input instead of scanf(). fgets() reads input line by line, which allows you to specify the maximum number of characters to read. This helps to prevent buffer overflow and ensures that all input is read correctly.

In summary, while scanf() is a useful function for reading input in C programming, it does have some drawbacks that can cause unexpected behavior in your program. By checking the return value and using fgets() instead of scanf(), you can avoid these potential issues and ensure that your program runs smoothly.

Illustration of public static void main(String[] args) in Java


public static void main(String[] args)

method is the entry point for Java programs. It is mandatory for every Java program to have a main method. Here is an example of how to write the main method in Java:

public class MyClass {
    public static void main(String[] args) {
        // Code to be executed
        System.out.println("Hello, World!");

In the example above, the main method is declared as

public static void

which means that it can be accessed from outside the class, without creating an object of the class. The method takes a

String[] args

parameter which is an array of strings that can be used to pass command line arguments to the program.

The code inside the main method is executed when the program runs. In the example above, the code simply prints the string "Hello, World!" to the console.

Understanding the Java String Pool

In Java, the String Pool is a special memory area in the heap where all the String literals are stored. When a String is created using a literal, such as "Hello", it is automatically stored in the String Pool. The main advantage of the String Pool is that it helps in saving memory by reusing the String objects in the pool, instead of creating new ones. This is because Java creates a new String object for every String that is created without using a String literal. Knowing how the String Pool works is important for optimizing memory usage in Java applications.

Why are Java Strings Immutable?

Java Strings are immutable because once created, their values cannot be changed. This means that any operation on a String object actually creates a new String. There are several reasons why Java Strings are designed to be immutable:

1. Security: Immutable strings are inherently more secure because they cannot be altered or tampered with once created. This makes them ideal for storing sensitive information like passwords.

2. Thread-safe: Because Strings are immutable, they are inherently thread-safe. Multiple threads can safely access and use the same String object without the risk of concurrent modification.

3. Optimization: Immutable strings are more efficient to work with. Since their values cannot be changed, they can be safely shared across multiple objects without risk of unintended side-effects.

Overall, while immutable strings may have some drawbacks in terms of memory usage and performance, their security, thread-safety, and ease of use make them an ideal choice for many applications.

Explanation of Shallow Copy vs Deep Copy in Java

In Java, the terms shallow copy and deep copy refer to the process of copying objects or data structures. A shallow copy creates a new object that references the same memory location as the original object, while a deep copy creates a new object with its own memory space and copies all the contents of the original object.

To better understand this concept, consider the following example:

public class MyClass {
   int[] myArray;
   public MyClass(int[] arr) {
       myArray = arr;

Here we have a class `MyClass` with an instance variable `myArray` of type `int[]`. When we create a new `MyClass` object and pass an array to its constructor, a shallow copy is made. This means that the new object `MyClass` and the original object share the same memory reference for the `myArray` variable.

To create a deep copy of `MyClass`, we must manually create a new array with its own memory space and copy the contents of the original array into it. For example:

public class MyClass {
   int[] myArray;
   public MyClass(int[] arr) {
       myArray = new int[arr.length];
       for (int i = 0; i < arr.length; i++) {
           myArray[i] = arr[i];

In this case, the `MyClass` constructor creates a new array with the same length as the original array and copies each element from the original array to the new array. This creates a completely new object with its own memory space.

In summary, shallow copy and deep copy refer to how objects or data structures are copied in Java. Shallow copy creates a new object that references the same memory location as the original object, while deep copy creates a new object with its own memory space and copies all the contents of the original object.

Memory Management in Python

In Python, memory management is handled by the interpreter. The memory in Python is divided into two parts - the stack and the heap. The stack is used for storing data that is created during the execution of a function, while the heap is used for storing data that is created at runtime.

Python uses a technique called reference counting to keep track of the objects in memory. When an object is created, Python assigns a reference count to it, which is the number of references to that object. When an object is no longer referenced, Python automatically deallocates the memory used by that object.

Python also uses a technique called garbage collection, which serves as a backup to reference counting. Garbage collection periodically looks for objects that might still be referenced but are no longer in use and deallocates the memory used by those objects.

Overall, Python's memory management makes it easier for developers to write programs without worrying about memory allocation and deallocation. However, there are certain cases where it's important to be aware of memory management, such as when dealing with large datasets or performance-intensive applications.

Difference between range() and xrange() in Python

In Python, both




functions are used to generate a sequence of integers, but they have some differences.



function returns a list of integers for a given range, while


returns a generator object that generates integers on the fly as for loop iterates over it.


loads all the integers into memory, whereas


generates each integer on-demand and only stores one integer at a time.

Here is an example of using





# Using range()
for i in range(5):

# Using xrange()
for i in xrange(5):

Both functions work the same for simple use cases, but


is more memory efficient for large ranges because it doesn't store all integers in memory at once. However,


is a Python 2 function that is not available in Python 3. In Python 3, the


function works like


in Python 2.

Advantages of Numpy Arrays over Python Lists

Numpy arrays have several advantages over Python lists, including:

1. Numpy arrays are faster and more efficient for numerical operations. 2. Numpy allows for vectorized operations, which can perform calculations on entire arrays without needing to loop over each element. 3. Numpy arrays can handle multidimensional data, while Python lists cannot. 4. Numpy provides various mathematical functions for array manipulation and analysis. 5. Numpy arrays can be easily saved and loaded from disk.

In summary, Numpy arrays are a powerful tool for numerical computing, offering efficient computation, multidimensional capabilities, and a wide range of mathematical functions.

Disadvantages of Using Array to Implement Queue

1. Fixed Size: In arrays, the size is fixed and it cannot be changed during runtime. Therefore, the maximum size of the queue needs to be predetermined, which can result in either insufficient or wasteful use of memory.

2. Uneconomical Memory Usage:If an array has a large fixed size, it can use a lot of memory even if the number of elements stored in it is small. This is an economical use of memory.

3. Costly Resize: To overcome the limitation of the fixed size, a new queue with a larger size can be created and all of the elements of the old array can be copied into it. This can be an expensive operation, especially when the queue is large.

4. Inserting and Deleting Elements: When inserting or deleting elements in an array-based queue, all subsequent elements may need to be shifted, which can be a time-consuming operation for large queues.

5. Contiguous Memory Allocation: Array elements are stored in contiguous memory locations. This can lead to memory fragmentation, which can affect the performance of the program.

Is there a good reason to choose BSTs over AVLs in the first place?

When deciding between Binary Search Trees (BSTs) and Adelson-Velskii and Landis Trees (AVLs), it's important to consider the pros and cons of each.

BSTs are a simpler data structure than AVLs, making them easier to implement and requiring less memory. However, their simplicity can also lead to a less balanced tree which may result in slower search times for certain operations.

On the other hand, AVLs are self-balancing which ensures that their depth is always log n, where n represents the number of nodes in the tree. This results in faster search times for a wider range of operations compared to BSTs. However, their implementation can be more complex and may require more memory.

Ultimately, the choice between BSTs and AVLs depends on the specific requirements of the problem at hand. If search time is a critical factor, AVLs may be the better choice. Otherwise, BSTs may provide a simpler and more efficient solution.

Advantages of Tries over Binary Search Trees (BSTs)

Tries have several advantages over Binary Search Trees (BSTs):

  • Tries can handle non-numeric keys such as strings, whereas BSTs require numeric keys.
  • Tries have faster search and insertion times compared to BSTs for large datasets.
  • Tries allow for efficient prefix searches, making them useful in autocomplete features for text input fields.
  • Tries can handle duplicate keys, whereas BSTs cannot.
  • Tries are more space-efficient than BSTs when storing many small keys.
// Example implementation of a Trie data structure in JavaScript

Differences Between Structures and Classes in C++

In C++, a structure and a class are two different ways to encapsulate data and functions.

The main difference between a structure and a class is that in a structure, by default, the members are public, whereas in a class, by default, the members are private. This means that the data in a structure can be accessed and modified by any part of the program, whereas the data in a class can only be accessed and modified through member functions.

Another difference is that in a class, you can declare member functions inline and define them outside the class, whereas in a structure, all member functions must be defined inline.

Furthermore, classes can also inherit from other classes using the "public," "protected," and "private" keywords, whereas structures cannot.

In general, structures are used for simple data stores, whereas classes are used for encapsulating data and functionality into reusable and extensible components. They can both be useful in different situations, depending on the needs of the program.

Difference between new() and malloc()

In C++, new() and malloc() are used for dynamic memory allocation. The main difference between the two is that new() is an operator while malloc() is a function. new() allocates memory space as well as initializes the memory with the given value, whereas malloc() only allocates memory and does not initialize it. Additionally, new() calls the constructor of the object while malloc() does not.

In C++, it is recommended to use new() for dynamic memory allocation of objects, and malloc() for allocating memory to fundamental data types like int, float, char, etc. However, with the introduction of smart pointers, it is suggested to use them instead of manually allocating and deallocating memory through new() and malloc().

Below is an example of using new() to create an object:

MyClass* obj = new MyClass(); // memory allocated and object initialized with default constructor

And here is an example of using malloc() to allocate memory for an array of integers:

int* arr = (int*) malloc(10 * sizeof(int)); // memory allocated for an array of 10 integers

It is important to note that when using malloc(), we need to explicitly cast the return value to the appropriate pointer type. Also, it is our responsibility to deallocate the memory when it is no longer needed using the free() function. In contrast, when using new(), the memory is automatically deallocated when the object goes out of scope.

Virtual Functions and Pure Virtual Functions in C++

A virtual function in C++ is a function declared in a base class that is redefined in a derived class. When the derived class object is accessed through a pointer or reference to the base class, the derived class function is called instead of the base class function.

A pure virtual function is a virtual function in a base class that is declared as "virtual function() = 0". A class containing pure virtual functions is called an abstract class because it cannot be instantiated. The derived classes must override the pure virtual function to be instantiated.

Here is an example:

class Shape {
      virtual double area() = 0;   // pure virtual function

class Circle: public Shape {
      double area() { 
         // calculate area of the circle

In this example, the Shape class is an abstract class because it contains the pure virtual function area(). The Circle class is a derived class that redefines the area() function.

Understanding DNS Forwarding

DNS (Domain Name System) forwarding refers to the process of redirecting DNS queries from one server to another. A DNS forwarder is a server that is configured to forward DNS queries to other DNS servers, commonly for a group of computers or a private network.

In essence, a DNS forwarder acts like a proxy to ensure that DNS queries can be resolved even when the primary DNS server is down or unavailable. It can also help to reduce DNS query times, as it caches frequently requested DNS records for faster access. DNS forwarding can be useful for organizations or individuals who want to improve network performance or reliability, and it is often used in conjunction with other DNS-related technologies, such as DNS caching or load balancing.

How Dynamic Host Configuration Protocol (DHCP) assists in network management?

DHCP is a networking protocol that assign IP addresses automatically to devices on a network. DHCP offers an efficient means of managing IP addresses and other network configuration options. Without DHCP, network administrators would need to manually assign IP addresses to individual machines, which would be a time-consuming endeavor.

DHCP also reduces the chance of IP address conflicts on a network. It helps to locate and resolve the issues quickly when two devices have been assigned the same IP address. Furthermore, DHCP provides a centralized database for managing IP addresses across a network.

In addition to IP addressing, DHCP can also be used to distribute other network configuration options like subnet masks, default gateways, and DNS server information. This flexibility allows administrators to maintain and manage their networks easily and efficiently.

Understanding Anonymous FTP (File Transfer Protocol)

Anonymous FTP is a type of file transfer protocol that allows users to connect to a server anonymously, without the need for a username or password. This means that anyone can access the server and download public files without the need for any authentication.

However, while anonymous FTP can be useful for sharing large files and public data, it can also pose security risks if not properly configured. This is because anonymous users often have the ability to write files to the server and can potentially upload malicious files or engage in unauthorized activities.

To mitigate these risks, it is recommended to carefully configure anonymous FTP to ensure proper access control and restrict write permissions when necessary. Additionally, it is important to monitor the server for any suspicious activity and enforce strong security measures to prevent unauthorized access.


The Golden Ratio, also known as the Divine Proportion or Phi, is a mathematical ratio of 1.618:1. It is seen in various forms of art, architecture, and nature. This ratio is believed to be aesthetically pleasing and can create a sense of harmony and balance in a design. It can be found in the human body, such as the distance between the navel and the foot compared to the distance from the navel to the top of the head. Many artists and designers use the Golden Ratio as a guide in creating visually appealing compositions.

CAPGEMINI Interview Preparation

Here are some useful tips to prepare for your CAPGEMINI interview:

  • Research the company's history, values and objectives thoroughly.
  • Familiarize yourself with the job description and the requirements.
  • Prepare responses to commonly asked interview questions.
  • Practice your body language and communication skills.
  • Dress professionally and arrive on time.
  • Show enthusiasm and interest in the job role and the company.
  • Ask questions about the company and the role to demonstrate your interest.
  • End the interview with a thank you note and a follow-up email or phone call.

By following these tips, you can increase your chances of success in your CAPGEMINI interview.

// If you have any questions or concerns, don't hesitate to contact the CAPGEMINI HR team.

Frequently Asked Questions

1. Is Capgemini a good company for freshers?

Is the Capgemini Interview Challenging?

Many candidates find the Capgemini interview process to be rigorous and demanding. The interviewers generally ask a mix of technical and behavioral questions to evaluate the candidate's skills, experience, knowledge, and communication abilities. Therefore, candidates must prepare well, review their resume thoroughly, research the company, and practice answering common interview questions.

Salary for Freshers in Capgemini

What is the starting salary for entry-level employees at Capgemini?

How to Join Capgemini?

If you are interested in joining Capgemini, follow these steps:

  1. Visit the Capgemini careers website.
  2. Search for open positions that match your skills and experience.
  3. Submit your resume and cover letter through the website.
  4. If selected for an interview, prepare for the interview and follow-up with a thank you email.
  5. If offered a job, review the offer and negotiate if needed.
  6. Accept the offer and begin your career with Capgemini!

Capgemini Bond Policy

Plain text: Does Capgemini have a bond policy?


//Capgemini Bond Policy

//Check with HR department for the current bond policy of Capgemini

Technical Interview Guides

Here are guides for technical interviews, categorized from introductory to advanced levels.

View All

Best MCQ

As part of their written examination, numerous tech companies necessitate candidates to complete multiple-choice questions (MCQs) assessing their technical aptitude.

View MCQ's
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.