Add office photos
Employer?
Claim Account for FREE

Capgemini Engineering

3.5
based on 2.1k Reviews
Filter interviews by

50+ Interview Questions and Answers

Updated 18 Sep 2024
Popular Designations
Q1. Sort an array of 0's, 1's and 2's

You have been given an integer array/list(ARR) of size 'N'. It only contains 0s, 1s and 2s. Write a solution to sort this array/list.

Note :
Try to solve the problem in 'Single ...read more
View 4 more answers
Q2. Quick Sort

You are given an array of integers. You need to sort the array in ascending order using quick sort.

Quick sort is a divide and conquer algorithm in which we choose a pivot point and partition the arra...read more

View 4 more answers
Q3. Detect loop in linked list

You have given a Singly Linked List of integers, determine if it forms a cycle or not.

A cycle occurs when a node's next points back to a previous node in the list. The linked list is ...read more

View 4 more answers
Q4. Remove all occurrences of a character in a string

For a given a string(str) and a character X, write a function to remove all the occurrences of X from the given string.

The input string will remain unchanged if...read more

View 2 more answers
Discover null interview dos and don'ts from real experiences
Q5. Detect loop in a Linked List

You have given a Singly Linked List of integers, determine if it forms a cycle or not.

A cycle occurs when a node's next points back to a previous node in the list. The linked list i...read more

View 4 more answers
Q6. Reverse a linked list
Input Format :
The first line of input contains a single integer T, ...read more
View 3 more answers
Are these interview questions helpful?
Q7. Merge Sort

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm - Merge sort is a Div...read more
View 3 more answers
Q8. Level order traversal of Binary Tree

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree 

Example

The level orde...read more
View 2 more answers
Share interview questions and help millions of jobseekers 🌟
Q9. Remove spaces from a given string

Given a string “STR”, you need to remove spaces from the string “STR” and rewrite in the Pascal case. Your task is to return the string “STR”.

In the Pascal case writing style w...read more

View 2 more answers
Q10. Delete Nth node from the end of the given linked list

You have been given a singly Linked List of 'N' nodes with integer data and an integer 'K'. Your task is to remove the Kth node from the end of the given Lin...read more

View 4 more answers
Q11. Factorial of a number

Write a program to find the factorial of a number.

Factorial of n is:

n! = n * (n-1) * (n-2) * (n-3)....* 1

Output the factorial of 'n'. If it does not exist, output 'Error'.

Input format :...read more
View 3 more answers
Q12. Compiler Design Question

What are the real life examples of non deterministic automata?

Add your answer

Q13. What have you done on real implementation on linux OS?

Ans.

I have implemented various software applications on Linux OS.

  • Developed a web application using Python Flask framework on Linux server

  • Created a custom Linux kernel module for a hardware device driver

  • Implemented a distributed system using Apache Kafka on Linux machines

  • Optimized performance of a database server running on Linux by tuning kernel parameters

Add your answer

Q14. What is microprocessor and explain register names?

Ans.

A microprocessor is a computer processor that incorporates the functions of a central processing unit on a single integrated circuit.

  • Microprocessors are used in various electronic devices such as computers, smartphones, and gaming consoles.

  • Register names include program counter (PC), accumulator (ACC), general-purpose registers (GPR), and memory address register (MAR).

  • Registers are used to store data and instructions temporarily for processing.

  • The number of registers and thei...read more

Add your answer

Q15. What is difference between C and C++?

Ans.

C++ is an extension of C with object-oriented programming features.

  • C++ supports object-oriented programming while C does not.

  • C++ has classes and templates while C does not.

  • C++ has better support for exception handling than C.

  • C++ has a standard library while C does not.

  • C++ allows function overloading while C does not.

Add your answer

Q16. What is difference between array and linked list?

Ans.

Arrays are contiguous blocks of memory while linked lists are made up of nodes that point to the next node.

  • Arrays have fixed size while linked lists can grow dynamically.

  • Insertion and deletion are faster in linked lists than in arrays.

  • Arrays have better cache locality while linked lists have better memory utilization.

  • Arrays are accessed using indices while linked lists are accessed using pointers.

  • Examples of arrays include int[] and char[] while examples of linked lists inclu...read more

Add your answer

Q17. Explain whole process for Example.c file to Example.exe conversion

Ans.

The process of converting Example.c file to Example.exe involves several steps.

  • Preprocessing: includes header file inclusion, macro expansion, and conditional compilation

  • Compilation: converts source code to object code

  • Linking: combines object code with libraries to create executable file

  • Debugging: identifying and fixing errors in code

  • Optimization: improving performance of executable file

Add your answer

Q18. What is data abstraction and explain with code?

Ans.

Data abstraction is the process of hiding implementation details and showing only necessary information.

  • Abstraction is achieved through abstract classes and interfaces.

  • It helps in reducing complexity and increasing efficiency.

  • Example: abstract class Shape with abstract method draw() implemented by its subclasses like Circle and Rectangle.

Add your answer
Q19. C++ Question

What are local, global and static variables?

Add your answer

Q20. I am working on multiple language so how you are comfortable to work on multiple language

Ans.

I am comfortable working with multiple languages and have experience in doing so.

  • I have experience working with languages such as Java, Python, C++, and JavaScript.

  • I am able to quickly adapt to new languages and learn them efficiently.

  • I understand the importance of proper documentation and commenting in code to ensure readability for others.

  • I have worked on projects that required integration of multiple languages, such as a web application with a backend in Python and a front...read more

Add your answer
Q21. Operating System Question

What is the difference between page and frame?

Add your answer
Q22. C Question

What are near, far and huge pointers?

Add your answer
Q23. Java Question

What are the types of access modifiers in Java?

Add your answer
Q24. Java Question

How are Java objects stored in memory?

Add your answer
Q25. Time Complexity Question

What are the time complexities for each sorting algorithms?

Add your answer
Q26. Computer Network Question

What is serial port and parallel port?

Add your answer
Q27. OOPS Question

What are the types of polymorphism?

Add your answer
Q28. Operating System Question

What is mutual exclusion?

Add your answer
Q29. OOPS Question

What is a virtual function?

Add your answer

Q30. Write a SQL query to join two tables?

Ans.

SQL query to join two tables

  • Use JOIN keyword to combine two tables based on a common column

  • Specify the columns to be selected using SELECT keyword

  • Use ON keyword to specify the common column between two tables

Add your answer

Q31. WAP for recursion and explain its working?

Ans.

Recursion is a technique where a function calls itself to solve a problem. WAP for recursion is to write a program using recursion.

  • Recursion is used to solve problems that can be broken down into smaller sub-problems.

  • The base case is the condition where the function stops calling itself.

  • The recursive case is where the function calls itself with a smaller input.

  • Example: Factorial of a number can be calculated using recursion.

  • Example: Fibonacci series can be generated using rec...read more

Add your answer
Q32. OOPS Question

What is data abstraction?

Add your answer
Q33. Operating System Question

What is Paging?

Add your answer
Q34. C++ Question

Difference between Definition and Declaration

Add your answer

Q35. What is TCP/IP,OSI model?

Ans.

TCP/IP is a protocol used for communication between devices on the internet. OSI model is a conceptual framework for network communication.

  • TCP/IP is a suite of protocols that governs communication between devices on the internet.

  • OSI model is a conceptual framework that divides network communication into seven layers.

  • TCP/IP is based on a four-layer model, which includes the application, transport, internet, and network access layers.

  • The OSI model includes the physical, data li...read more

Add your answer

Q36. What is program counter?

Ans.

Program counter is a register that stores the memory address of the next instruction to be executed by the processor.

  • Program counter is also known as instruction pointer.

  • It is a part of the processor's control unit.

  • The value of program counter is incremented after each instruction is executed.

  • If a program counter is corrupted, the processor may execute incorrect instructions.

  • Example: If the program counter is pointing to memory address 100, the next instruction to be executed...read more

Add your answer
Q37. Operating System Question

Difference between Mutex and Semaphore

Add your answer
Q38. Computer Network Question

Explain the different OSI Layers.

Add your answer

Q39. How to get unique elements from list

Ans.

To get unique elements from a list, use set() function.

  • Convert the list to a set using set() function

  • Convert the set back to list using list() function

  • Example: list(set(['apple', 'banana', 'apple', 'orange'])) will return ['apple', 'banana', 'orange']

Add your answer
Q40. C Question

Explain the sizeof operator.

Add your answer

Q41. Explain SQL commands?

Ans.

SQL commands are used to interact with databases and manipulate data.

  • SELECT: retrieve data from a database

  • INSERT: add new data to a database

  • UPDATE: modify existing data in a database

  • DELETE: remove data from a database

  • CREATE: create a new database or table

  • ALTER: modify the structure of a database or table

  • DROP: delete a database or table

  • JOIN: combine data from multiple tables

  • GROUP BY: group data based on a specific column

  • ORDER BY: sort data based on a specific column

Add your answer

Q42. How memory allocated to object

Ans.

Memory is allocated to objects dynamically during runtime based on their size and type.

  • Memory allocation is done using the 'new' keyword in languages like Java and C++.

  • In languages like Python, memory allocation is handled automatically by the interpreter.

  • Memory allocation can also be done using functions like malloc() and calloc() in C.

  • Memory is released using the 'delete' keyword in languages like Java and C++.

  • Memory management is important to prevent memory leaks and optim...read more

Add your answer

Q43. WAP to reverse string?

Ans.

A program to reverse a given string.

  • Create an empty string to store the reversed string.

  • Iterate through the original string from end to start.

  • Append each character to the empty string.

  • Return the reversed string.

Add your answer

Q44. Explain pointers and heap ?

Ans.

Pointers are variables that store memory addresses. Heap is a region of memory used for dynamic memory allocation.

  • Pointers are used to access memory directly

  • Heap is used for dynamic memory allocation

  • Pointers can be used to create data structures like linked lists

  • Heap memory must be manually managed to avoid memory leaks

Add your answer

Q45. What is join and how many types.

Ans.

Join is a SQL operation that combines rows from two or more tables based on a related column between them.

  • Join is used to retrieve data from multiple tables in a single query.

  • There are four types of joins: Inner Join, Left Join, Right Join, and Full Outer Join.

  • Inner Join returns only the matching rows from both tables.

  • Left Join returns all the rows from the left table and matching rows from the right table.

  • Right Join returns all the rows from the right table and matching rows...read more

Add your answer

Q46. find non repeating character in an array

Ans.

Find the first non-repeating character in an array.

  • Use a hash table to store the frequency of each character.

  • Iterate through the array and check the frequency of each character.

  • Return the first character with a frequency of 1.

Add your answer

Q47. Comparable vs comparator

Ans.

Comparable is an interface used for natural ordering while Comparator is an interface used for custom ordering.

  • Comparable is implemented by the class whose objects need to be sorted

  • Comparator is implemented by a separate class to define custom sorting logic

  • Comparable uses compareTo() method to compare objects

  • Comparator uses compare() method to compare objects

  • Example: String class implements Comparable interface for natural ordering

  • Example: Employee class implements Comparator...read more

Add your answer

Q48. Hash table implementation

Ans.

Hash table is a data structure that maps keys to values using a hash function.

  • Hash function maps keys to indices in an array

  • Collisions can occur, which can be resolved using techniques like chaining or open addressing

  • Lookup, insertion, and deletion operations have an average time complexity of O(1)

Add your answer

Q49. what is destructing in JS

Ans.

Destructuring is a way to extract values from objects and arrays into distinct variables.

  • Destructuring can be used with arrays and objects

  • It allows you to extract values from nested objects and arrays

  • You can also set default values for variables that may not exist in the object or array

  • Example: const {name, age} = {name: 'John', age: 30};

  • Example: const [first, second] = ['one', 'two'];

Add your answer

Q50. Explain about oops

Ans.

Object-oriented programming paradigm that focuses on objects and classes for code organization and reusability.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (object)

  • Inheritance: Ability for a class to inherit properties and behavior from another class

  • Polymorphism: Ability for objects of different classes to respond to the same method call in different ways

Add your answer

Q51. Realtime examples

Ans.

Realtime examples of software engineering concepts

  • Implementing a chat application with real-time messaging using WebSockets

  • Developing a stock trading platform with live updates on stock prices

  • Creating a multiplayer online game with real-time player interactions

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 8 interviews in the last 1 year
2 Interview rounds
Technical Round 1
Technical Round 2
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

3.5
 • 75 Interview Questions
3.6
 • 30 Interview Questions
5.0
 • 21 Interview Questions
3.4
 • 17 Interview Questions
3.9
 • 12 Interview Questions
3.1
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter