GlobalLogic
20+ Marc Laboratories Interview Questions and Answers
Q1. MapSum Pair Implementation
Create a data structure named 'MapSum' with the ability to perform two operations and a constructor.
Explanation:
MapSum()
: Initializes the MapSum.insert(...read more
The question asks to implement a data structure called 'MapSum' with functions to initialize, insert key-value pairs, and find the sum of values with a given prefix.
Implement a class called 'MapSum' with a constructor to initialize the data structure.
Implement the 'insert' function to insert key-value pairs into the 'MapSum'. If a key is already present, replace its value with the new one.
Implement the 'sum' function to find the sum of values whose key has a prefix equal to t...read more
Q2. Reverse the String Problem Statement
You are given a string STR
which contains alphabets, numbers, and special characters. Your task is to reverse the string.
Example:
Input:
STR = "abcde"
Output:
"edcba"
Input...read more
The task is to reverse a given string containing alphanumeric and special characters.
Iterate through the string from the last character to the first character
Append each character to a new string to get the reversed string
Return the reversed string as the output
Q3. What’s the diff b/w comparator and comparable
Comparator is used to compare objects of different classes while Comparable is used to compare objects of the same class.
Comparator is an interface that needs to be implemented to compare objects of different classes.
Comparable is an interface that needs to be implemented to compare objects of the same class.
Comparator uses compare() method while Comparable uses compareTo() method.
Comparator can be used to sort a collection in any order while Comparable can only sort in natur...read more
Q4. How do you migrate code from one language to another
Code migration involves understanding the existing codebase, planning the migration process, translating code to the new language, testing thoroughly, and ensuring compatibility.
Understand the existing codebase thoroughly to identify dependencies, logic, and functionality.
Plan the migration process by breaking it down into smaller tasks, setting timelines, and allocating resources.
Translate the code to the new language by rewriting or using automated tools like transpilers.
Te...read more
Q5. Use of pointer in C Storage class in C Memory layout in C little and big endian program how find Com stack and COM-SM
Pointers in C are used to store memory addresses, storage classes determine the scope and lifetime of variables, memory layout refers to how data is organized in memory, endianness refers to byte order, COM stack is a communication protocol.
Pointers in C are used to store memory addresses of variables.
Storage classes in C determine the scope and lifetime of variables.
Memory layout in C refers to how data is organized in memory.
Endianness in C refers to the byte order of multi...read more
Q6. Write a program to print the duplicate character in a string?
Program to print duplicate characters in a string
Create a map to store characters and their counts
Iterate through the string and update the map
Print characters with count > 1 as duplicates
Q7. What is difference between fall fast and fall safe.
Fall fast refers to failing quickly and early in the development process, while fall safe refers to implementing safety measures to prevent failures.
Fall fast involves identifying and addressing issues early on in the development cycle.
Fall safe involves implementing safety measures such as error handling and redundancy to prevent failures.
An example of fall fast is using automated testing to catch bugs early in the development process.
An example of fall safe is implementing ...read more
Q8. Activity call backs while doing the confiuration changes.
Activity call backs are used to handle configuration changes in software.
Activity call backs are methods that are called when certain events occur in an activity's lifecycle.
They are commonly used to handle configuration changes such as screen rotation or language changes.
By implementing activity call backs, developers can save and restore important data or update the UI accordingly.
Examples of activity call backs include onCreate(), onPause(), onResume(), etc.
Q9. What is Java and what is OOPS Concept
Java is a popular programming language known for its portability and OOPS is a programming paradigm based on objects and classes.
Java is a high-level, class-based, object-oriented programming language.
OOPS (Object-Oriented Programming) is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
OOPS concepts include Inheritance, Encapsulation, Polymorphism, and Abstraction.
Example: In Java, you can...read more
Q10. Write programming logic for Await and Sync
Await and Sync are programming concepts used for managing asynchronous operations in code execution.
Await is used to pause the execution of a function until a Promise is settled, returning the result.
Sync is used to synchronize multiple threads or processes to ensure they are executed in a specific order.
Example: await fetch('https://api.example.com/data')
Example: sync.Mutex.Lock()
Both Await and Sync are important for handling concurrency and improving performance in software...read more
Q11. Program to check if string is palindrome or not
Program to check if a string is a palindrome or not
Create a function that takes a string as input
Remove all non-alphanumeric characters and convert to lowercase
Compare the original string with its reverse to check if it's a palindrome
Return true if it's a palindrome, false otherwise
Q12. Feature and benefits of Spring boot ?
Spring Boot is a framework that simplifies the development of Java applications.
Provides a pre-configured environment for building production-grade applications
Reduces boilerplate code and configuration
Supports a wide range of data sources and integrations
Enables easy deployment and scaling of applications
Offers built-in security features
Example: Spring Boot can be used to quickly create a RESTful API with minimal setup
Q13. What are observables in Angular
Observables are a way to handle asynchronous data streams in Angular.
Observables are similar to Promises but can handle multiple values over time.
They can be created using the RxJS library.
They can be used for handling HTTP requests, user input, and other asynchronous events.
Operators can be used to transform, filter, and combine observables.
Subscriptions are used to listen for and handle emitted values from observables.
Q14. What is init block in kotlin.
The init block in Kotlin is used to initialize properties or execute code when an object is created.
The init block is defined inside a class and is executed immediately after the primary constructor.
It can be used to initialize properties or perform any other necessary setup.
Multiple init blocks can be defined in a class, and they are executed in the order of their appearance.
The init block is useful when you need to execute code during object creation that cannot be handled ...read more
Q15. What is the use of RxJS
RxJS is a reactive programming library for JavaScript.
RxJS allows for easier management of asynchronous data streams.
It provides operators for filtering, transforming, and combining data streams.
RxJS can be used in both front-end and back-end development.
Examples of its use include handling user input, making HTTP requests, and managing state in a Redux store.
Q16. how microservices are developed.
Microservices are developed by breaking down a large application into smaller, independent services that communicate with each other through APIs.
Identify the boundaries of each microservice based on business capabilities
Design each microservice to be independent and loosely coupled
Use lightweight protocols like HTTP or messaging queues for communication between microservices
Implement each microservice using the technology stack best suited for its requirements
Deploy microser...read more
Q17. what is Selenium webdriver?
Selenium WebDriver is a tool used for automating web application testing.
Selenium WebDriver is a popular automation tool for testing web applications.
It supports multiple programming languages such as Java, Python, C#, etc.
WebDriver interacts with the web browser to simulate user actions like clicking buttons, entering text, etc.
It can run tests on different browsers like Chrome, Firefox, Safari, etc.
WebDriver can handle complex scenarios like handling pop-ups, alerts, frames...read more
Q18. What are OOPS concepts
OOPS concepts refer to Object-Oriented Programming principles such as inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features.
Q19. What is Agile methodology
Agile methodology is a project management approach that emphasizes flexibility, collaboration, and incremental development.
Agile focuses on delivering working software in short, iterative cycles called sprints.
It values customer collaboration, responding to change, and continuous improvement.
Key principles include individuals and interactions over processes and tools, working software over comprehensive documentation, customer collaboration over contract negotiation, and resp...read more
Q20. Explain about CAN protocol Details?
CAN protocol is a communication protocol used in automotive and industrial applications for high-speed data transmission.
CAN stands for Controller Area Network
It is a message-based protocol used for communication between electronic control units (ECUs) in vehicles
CAN uses a two-wire bus for communication - CAN High and CAN Low
Messages in CAN protocol are prioritized based on their identifier
CAN supports two message formats - Standard CAN and Extended CAN
Error detection and fa...read more
Q21. What is react router dom
React Router DOM is a popular routing library for React applications.
Used for handling routing in React applications
Allows for declarative routing using components like BrowserRouter, Route, Switch, etc.
Enables navigation between different components without full page reloads
Q22. Write a program for palindrome
Program to check if a given string is a palindrome
Create a function that takes a string as input
Remove all non-alphanumeric characters and convert to lowercase
Compare the string with its reverse to check if it is a palindrome
Q23. Oops concepts explanation
Oops concepts are fundamental principles of object-oriented programming such as inheritance, polymorphism, encapsulation, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Polymorphism: Allows objects to be treated as instances of their parent class or as instances of their own class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Abstraction: Hiding the implementation details and showing onl...read more
Q24. Build a MEAN stack app
MEAN stack app development involves using MongoDB, Express.js, Angular, and Node.js
Use MongoDB as the database to store data
Utilize Express.js for building the backend API
Develop the frontend using Angular framework
Use Node.js for server-side scripting and handling requests
Q25. Methods of Rest Apis
Methods of Rest Apis
GET: Retrieve data from a server
POST: Send data to a server to create a new resource
PUT: Update an existing resource on a server
DELETE: Remove a resource from a server
PATCH: Partially update an existing resource on a server
Top HR Questions asked in Marc Laboratories
Interview Process at Marc Laboratories
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month