Capgemini
10+ BLSD Labs Interview Questions and Answers
Q1. Given two integers as input, how can you find the difference and determine how many numbers can be divided by 3 within that difference?
Calculate the difference between two integers and find how many numbers within that difference are divisible by 3.
Calculate the absolute difference between the two integers
Iterate through the range of numbers within the difference and check if each number is divisible by 3
Keep a count of numbers divisible by 3
Q2. How can we invoke each method if two interfaces define the same methods?
To invoke methods from two interfaces with same method names, use explicit interface implementation.
Use explicit interface implementation to differentiate between the methods from each interface.
Specify the interface name followed by the method name to invoke the desired method.
Example: InterfaceA.Method() and InterfaceB.Method() to invoke methods from InterfaceA and InterfaceB respectively.
Q3. Given a string, identify the indices of all first occurrences of vowels and return the count of these indices.
Identify first occurrences of vowels in a string and return their indices along with count.
Loop through the string and check if each character is a vowel (a, e, i, o, u)
Store the index of the first occurrence of each vowel in a separate array
Return the array of indices and the count of indices
Q4. What is the role of a static constructor?
Static constructor is used to initialize static data members of a class.
Executed only once when the class is first accessed
Cannot have any access modifiers or parameters
Used to initialize static variables or perform any necessary setup tasks
Q5. How do microservices communicate with each other?
Microservices communicate with each other through APIs, messaging queues, and service discovery.
APIs: Microservices can communicate with each other by exposing APIs that allow them to send and receive data.
Messaging queues: Microservices can use messaging queues like RabbitMQ or Kafka to send messages to each other asynchronously.
Service discovery: Microservices can use service discovery tools like Consul or Eureka to locate and communicate with other services in the network....read more
Q6. Print “hello world!!” As hello one line. World 2nd line !! 3rd line
Print 'hello world!!' in three separate lines.
Use a programming language's print function to output 'hello' on the first line, 'world' on the second line, and '!!' on the third line.
In JavaScript, you can achieve this using console.log() function with line breaks like console.log('hello\nworld\n!!');
Q7. Occurrence of each character in a given String?
Count the occurrence of each character in a given string.
Iterate through the string and use a hashmap to store the count of each character.
Handle both uppercase and lowercase characters separately.
Consider using ASCII values to map characters to their respective counts.
Q8. How do we resolve Git Conflit?
Git conflicts can be resolved by merging changes, resolving conflicts manually, and using tools like Git mergetool.
Merge changes from the conflicting branches
Resolve conflicts manually by editing the conflicting files
Use Git mergetool to help resolve conflicts
Commit the resolved changes after resolving conflicts
Q9. Content Negotiation in ASP .Net Web API?
Content negotiation in ASP .Net Web API allows clients to request data in different formats like JSON, XML, etc.
Content negotiation is the process of selecting the best representation for a given response when there are multiple representations available.
In ASP .Net Web API, content negotiation is handled by the MediaTypeFormatter class which selects the appropriate formatter based on the request headers.
Clients can specify their preferred media type using the 'Accept' header...read more
Q10. What is dependency injection?
Dependency injection is a design pattern used to remove hard-coded dependencies and make code more flexible and testable.
It allows objects to be created with their dependencies rather than having to create them within the object itself.
It promotes loose coupling between objects.
It makes code more modular and easier to maintain.
Examples include using a DI container like Unity or Autofac, or manually injecting dependencies through constructors or properties.
Q11. What is azure service
Azure service is a cloud computing platform by Microsoft that provides various services for building, deploying, and managing applications.
Azure service offers a wide range of services including virtual machines, storage, databases, and analytics.
It also provides services for AI and machine learning, IoT, and DevOps.
Azure service can be used for building and deploying web applications, mobile apps, and enterprise solutions.
Some popular Azure services include Azure Virtual Mac...read more
Q12. Cluster vs Non Cluster Index
Clustered index physically orders the data rows in the table, while non-clustered index does not.
Clustered index determines the physical order of data rows in the table.
Non-clustered index is a separate structure that contains pointers to the actual data rows.
Clustered index is faster for retrieval of data in the order of the index key.
Non-clustered index is faster for retrieval of data not in the order of the index key.
Q13. Rest vs WCF
Rest is lightweight, WCF is feature-rich. Rest uses HTTP, WCF uses SOAP. Rest is platform-independent, WCF is Microsoft-centric.
Rest is lightweight and simple to use, making it ideal for web services. WCF is feature-rich and provides more advanced capabilities.
Rest uses HTTP for communication, making it easier to work with in web environments. WCF uses SOAP, which can be more complex and heavyweight.
Rest is platform-independent and can be used with any programming language. W...read more
More about working at Capgemini
Interview Process at BLSD Labs
Reviews
Interviews
Salaries
Users/Month