Lloyds Technology Centre
10+ Man Foods Interview Questions and Answers
Q1. How to mock test cases using jest and react-testing library
Mock test cases using jest and react-testing library
Use jest.fn() to create mock functions for testing
Use jest.mock() to mock dependencies
Use render() from react-testing library to render components for testing
Use fireEvent() from react-testing library to simulate user interactions
Use expect() from jest to make assertions on test results
Q2. what are I/O streams and uses
I/O streams are channels through which data can be transferred between a program and an external source or destination.
I/O streams can be used for reading input from a keyboard or file
I/O streams can be used for writing output to a screen or file
I/O streams can be used for network communication
Q3. what is middleware
Middleware is software that acts as a bridge between different applications or components, allowing them to communicate and work together.
Middleware facilitates communication between different software components
It can handle tasks such as data transformation, security, and routing
Examples include message brokers like RabbitMQ, API gateways like Kong, and web servers like Nginx
Q4. what is callback
A callback is a function that is passed as an argument to another function and is executed after a specific event occurs.
Used in asynchronous programming to handle responses or events
Allows for more flexible and modular code
Commonly used in JavaScript for event handling
Q5. Function declaration vs Function expression
Function declaration is hoisted and can be called before it's defined, while function expression is not hoisted and must be defined before it's called.
Function declaration is hoisted, function expression is not
Function declaration can be called before it's defined, function expression must be defined before it's called
Function declaration syntax: function myFunction() {}, function expression syntax: const myFunction = function() {}
Q6. Write Fibonacci Code
Fibonacci code generates a series of numbers where each number is the sum of the two preceding ones.
Start with two initial numbers, usually 0 and 1
Iterate through a loop to calculate the next number by adding the previous two numbers
Repeat until desired number of Fibonacci numbers are generated
Q7. Error boundaries in JS
Error boundaries in JS help catch and handle errors in React components.
Error boundaries are React components that catch JavaScript errors anywhere in their child component tree.
They log errors and display a fallback UI instead of crashing the whole app.
To create an error boundary, define a new component with componentDidCatch(error, info) method.
Use error boundaries sparingly as they only catch errors in components below them in the tree.
Example: class ErrorBoundary extends ...read more
Q8. Event Looping in JS
Event Looping in JS is the mechanism that allows JavaScript to handle asynchronous operations by executing callback functions in a non-blocking way.
Event Loop is responsible for executing code, collecting and processing events, and executing queued sub-tasks.
JS is single-threaded, so Event Loop helps in managing asynchronous operations without blocking the main thread.
Tasks are added to the call stack, then executed and removed. If a task is asynchronous, it is moved to the W...read more
Q9. What's your expected ctc
My expected CTC is based on industry standards and my experience level.
Based on my research, I am expecting a salary in the range of $80,000 to $100,000 per year.
I am open to negotiation based on the overall compensation package offered by the company.
I am looking for a competitive salary that reflects my skills and experience in the software engineering field.
Q10. Sql loop query to unnest nested list
Use SQL loop query to unnest nested list
Use a recursive CTE (Common Table Expression) to unnest the nested list
Join the CTE with the original table to retrieve the unnested data
Consider using functions like JSON_ARRAY_ELEMENTS() for JSON data
Q11. What are the Agile metrics you follow
Agile metrics include velocity, burndown charts, lead time, cycle time, and sprint burndown.
Velocity: Measure of work completed in a sprint
Burndown charts: Track progress towards completing all work in a sprint
Lead time: Time taken from a customer request to its completion
Cycle time: Time taken to complete a task once work begins
Sprint burndown: Track progress of work within a sprint
Q12. what is string intern?
String intern is a method in Java that returns a canonical representation of a string object.
String intern() method returns a canonical representation for the string object.
It returns the string from the pool of strings, if it is already present.
If not present, then it adds the string to the pool and returns the reference.
Q13. Previous experiance and challenges
I have over 5 years of experience as a Data Analyst, working on various projects and overcoming challenges.
Experience in analyzing large datasets and extracting valuable insights
Challenges include dealing with incomplete or messy data, and finding creative solutions to data-related problems
Proficient in using tools like SQL, Python, and Tableau to manipulate and visualize data
Experience in presenting findings to stakeholders and making data-driven recommendations
Q14. oops concepts in depth
Object-oriented programming principles including 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.
Top HR Questions asked in Man Foods
Interview Process at Man Foods
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month