i
Capgemini
Filter interviews by
Code flow refers to the sequence of execution in a program, detailing how functions and statements are processed.
1. Start with the main function: The entry point of a Go program is the 'main' function, where execution begins.
2. Function calls: When a function is called, control is transferred to that function, executing its code block.
3. Control flow statements: Use of 'if', 'for', and 'switch' statements to direc...
To unsort a sorted slice in Go, you can use randomization or shuffle techniques to achieve a non-deterministic order.
Use the 'math/rand' package: You can shuffle a slice using the 'Shuffle' function from the 'math/rand' package.
Example: 'rand.Shuffle(len(slice), func(i, j int) { slice[i], slice[j] = slice[j], slice[i] })' will randomize the order of elements.
Custom Shuffle: Implement your own shuffle algorithm, li...
The output of the provided Go code depends on its specific implementation and logic.
Go uses goroutines for concurrency, which can affect output timing.
Example: A simple program printing numbers may show them in a different order due to goroutine scheduling.
Understanding channels is crucial for managing data flow between goroutines.
Buffered channels allow multiple senders to send data without blocking, while unbuffered channels block until data is received.
Buffered channels have a fixed capacity and can store multiple values until they are received
Unbuffered channels have no capacity and block until a receiver is ready to receive the data
Buffered channels are useful for improving performance in cases where there are multiple senders
Unbuffere...
What people are saying about Capgemini
10 Docker commands and their uses
docker run - starts a new container
docker stop - stops a running container
docker ps - lists all running containers
docker images - lists all available images
docker build - builds an image from a Dockerfile
docker push - pushes an image to a registry
docker pull - pulls an image from a registry
docker exec - runs a command in a running container
docker rm - removes a container
docker rmi ...
Interfaces are used to define a set of methods that a type must implement.
Interfaces allow for polymorphism and decoupling of code.
They are commonly used in Go projects for defining contracts between different components.
Interfaces can be used to create mock objects for testing purposes.
An example of an interface in Go is the io.Reader interface, which defines the Read method.
Channels are used for communication and synchronization between goroutines in a project.
Channels allow safe communication between goroutines without the need for locks or condition variables.
They can be used to synchronize the execution of multiple goroutines.
Channels can be used to implement pipelines, where each stage of the pipeline is a goroutine that communicates with the next stage through a channel.
Channels...
The select case in Go allows handling multiple channel operations, enabling concurrent programming effectively.
Used to wait on multiple channel operations, allowing for non-blocking communication.
Example: Handling multiple goroutines that send data on different channels.
Syntax: 'select { case ch1 <- val: ...; case ch2 <- val: ...; default: ... }'
Helps in implementing timeouts and cancellation in concurrent o...
Go is a fast, efficient, and easy-to-learn programming language with built-in concurrency features.
Advantages of Go include its speed, simplicity, and concurrency features.
Garbage collection is supported by other languages such as Java, Python, and Ruby.
Go routines allow for easy and efficient concurrency without the need for traditional multithreading.
Go is used by companies such as Google, Uber, and Dropbox for ...
Buffered channels have a fixed capacity while unbuffered channels have no capacity limit.
Buffered channels allow sending multiple values without blocking until the buffer is full.
Unbuffered channels block until the sender and receiver are both ready to communicate.
Error handling methods include returning errors as values, using panic and recover, and logging errors.
Errors can be solved by identifying the root caus...
I applied via Approached by Company and was interviewed in Oct 2024. There was 1 interview round.
Golang Basics, DBMS, Channels, Unit Test
I appeared for an interview in Mar 2025, where I was asked the following questions.
Code flow refers to the sequence of execution in a program, detailing how functions and statements are processed.
1. Start with the main function: The entry point of a Go program is the 'main' function, where execution begins.
2. Function calls: When a function is called, control is transferred to that function, executing its code block.
3. Control flow statements: Use of 'if', 'for', and 'switch' statements to direct the...
To unsort a sorted slice in Go, you can use randomization or shuffle techniques to achieve a non-deterministic order.
Use the 'math/rand' package: You can shuffle a slice using the 'Shuffle' function from the 'math/rand' package.
Example: 'rand.Shuffle(len(slice), func(i, j int) { slice[i], slice[j] = slice[j], slice[i] })' will randomize the order of elements.
Custom Shuffle: Implement your own shuffle algorithm, like th...
I applied via Approached by Company and was interviewed in Aug 2024. There were 3 interview rounds.
I applied via Naukri.com and was interviewed in Jan 2023. There were 2 interview rounds.
Buffered channels allow multiple senders to send data without blocking, while unbuffered channels block until data is received.
Buffered channels have a fixed capacity and can store multiple values until they are received
Unbuffered channels have no capacity and block until a receiver is ready to receive the data
Buffered channels are useful for improving performance in cases where there are multiple senders
Unbuffered cha...
I am a Golang developer with experience in building scalable web applications.
Developed a RESTful API using Golang and MongoDB for a social media platform
Implemented authentication and authorization using JWT
Optimized database queries for improved performance
Utilized Goroutines and channels for concurrent processing
Integrated third-party APIs for data retrieval and processing
Go is a fast, efficient, and easy-to-learn programming language with built-in concurrency features.
Advantages of Go include its speed, simplicity, and concurrency features.
Garbage collection is supported by other languages such as Java, Python, and Ruby.
Go routines allow for easy and efficient concurrency without the need for traditional multithreading.
Go is used by companies such as Google, Uber, and Dropbox for its p...
A channel is a way for goroutines to communicate with each other and synchronize their execution.
Channels are typed and can only transmit values of that type.
There are two types of channels: buffered and unbuffered.
Unbuffered channels block until a sender and receiver are ready to communicate.
Buffered channels have a fixed capacity and can transmit values without blocking until the buffer is full.
Channels can be used t...
Buffered channels have a fixed capacity while unbuffered channels have no capacity limit.
Buffered channels allow sending multiple values without blocking until the buffer is full.
Unbuffered channels block until the sender and receiver are both ready to communicate.
Error handling methods include returning errors as values, using panic and recover, and logging errors.
Errors can be solved by identifying the root cause, im...
Yes, Go allows returning different data types. Go has OOP concepts and I have worked with microservices architecture.
Go allows returning different data types using interfaces.
I have worked with microservices architecture using Go and Docker.
Go has OOP concepts like structs and methods.
Questions on Go programming language concepts
Empty interface is an interface with no methods. Empty struct is a struct with no fields.
Array has fixed size, slice is dynamic. Array is passed by value, slice is passed by reference.
Function is standalone, method is associated with a type. Method has a receiver, function does not.
Complicity faced in project: Handling concurrent requests and ensuring data consistency
Implemented mutex locks to prevent race conditions
Used channels to coordinate communication between goroutines
Ensured atomicity of operations on shared data
Implemented retry mechanisms to handle failed requests
I applied via Naukri.com and was interviewed in Jan 2023. There were 2 interview rounds.
Channels are used for communication and synchronization between goroutines in a project.
Channels allow safe communication between goroutines without the need for locks or condition variables.
They can be used to synchronize the execution of multiple goroutines.
Channels can be used to implement pipelines, where each stage of the pipeline is a goroutine that communicates with the next stage through a channel.
Channels can ...
The select case in Go allows handling multiple channel operations, enabling concurrent programming effectively.
Used to wait on multiple channel operations, allowing for non-blocking communication.
Example: Handling multiple goroutines that send data on different channels.
Syntax: 'select { case ch1 <- val: ...; case ch2 <- val: ...; default: ... }'
Helps in implementing timeouts and cancellation in concurrent operat...
Interfaces are used to define a set of methods that a type must implement.
Interfaces allow for polymorphism and decoupling of code.
They are commonly used in Go projects for defining contracts between different components.
Interfaces can be used to create mock objects for testing purposes.
An example of an interface in Go is the io.Reader interface, which defines the Read method.
10 Docker commands and their uses
docker run - starts a new container
docker stop - stops a running container
docker ps - lists all running containers
docker images - lists all available images
docker build - builds an image from a Dockerfile
docker push - pushes an image to a registry
docker pull - pulls an image from a registry
docker exec - runs a command in a running container
docker rm - removes a container
docker rmi - rem...
I applied via Company Website and was interviewed before Feb 2020. There was 1 interview round.
I applied via LinkedIn and was interviewed before Jul 2021. There were 2 interview rounds.
Easy logical questions
basic quant
Easy level coding questions
Counting frequency of alphabets
I applied via Campus Placement and was interviewed before Jun 2020. There were 3 interview rounds.
I applied via Job Portal and was interviewed before Dec 2019. There was 1 interview round.
I applied via Naukri.com and was interviewed in Aug 2018. There was 0 interview round.
Some of the top questions asked at the Capgemini Golang Developer interview -
based on 5 interview experiences
Difficulty level
Duration
Gurgaon / Gurugram,
Bangalore / Bengaluru
3-8 Yrs
Not Disclosed
Consultant
58.6k
salaries
| ₹8.9 L/yr - ₹16.5 L/yr |
Associate Consultant
51.2k
salaries
| ₹4.5 L/yr - ₹10 L/yr |
Senior Consultant
50k
salaries
| ₹12.5 L/yr - ₹21 L/yr |
Senior Analyst
22k
salaries
| ₹3.1 L/yr - ₹7.5 L/yr |
Senior Software Engineer
21.6k
salaries
| ₹4.7 L/yr - ₹12.8 L/yr |
Wipro
Accenture
Cognizant
TCS