MSys Tech India
10+ Dr. Reddy's Interview Questions and Answers
Q1. Deep dive in node js and projects
Node.js is a runtime environment that allows you to run JavaScript on the server side.
Node.js is built on Chrome's V8 JavaScript engine.
It uses an event-driven, non-blocking I/O model.
Node.js is commonly used for building web applications and APIs.
Popular frameworks for Node.js include Express and Koa.
Q2. what is dependency injection
Dependency injection is a design pattern in which components are given their dependencies rather than creating them internally.
Dependency injection helps in achieving loose coupling between classes.
It allows for easier testing by providing a way to mock dependencies.
There are three types of dependency injection - constructor injection, setter injection, and interface injection.
Q3. what is inheritance
Inheritance is a concept in object-oriented programming where a class inherits attributes and methods from another class.
Allows a class to inherit properties and behaviors from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Derived class can access public and protected members of the base class
Example: class Car inherits from class Vehicle
Q4. what is polymorphism
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example: a superclass Animal with subclasses Dog and Cat. Both Dog and Cat can be treated as Animals.
Q5. what are goroutines
Goroutines are lightweight threads managed by the Go programming language.
Goroutines allow concurrent execution of functions
They are multiplexed onto multiple OS threads by the Go runtime
They are more efficient than traditional threads due to lower memory footprint and faster startup time
Q6. How to communicate between components ?
Components can communicate through various methods like props, events, and state.
Components can pass data through props from parent to child components.
Events can be used to trigger actions in other components.
State can be used to manage data within a component and can be passed down through props.
Context API can be used to share data between components without having to pass props down through every level of the component tree.
Q7. What are directives ?
Directives are markers on a DOM element that tell AngularJS to attach a specified behavior to that element.
Directives are used to create custom HTML tags that serve as new, reusable widgets.
They can be used to manipulate the DOM, add event listeners, and create two-way data bindings.
Examples of built-in directives include ng-model, ng-repeat, and ng-show.
Directives can be restricted to only apply to elements, attributes, classes, or comments.
They can also be used to create an...read more
Q8. What is a mvc
MVC stands for Model-View-Controller, a software design pattern used to separate the application logic into three interconnected components.
Model represents the data and business logic of the application
View is responsible for displaying the data to the user
Controller acts as an intermediary between Model and View, handling user input and updating the Model accordingly
Q9. What is the method for implementing inheritance in Golang?
In Golang, inheritance is implemented using composition instead of traditional inheritance.
Golang does not support traditional inheritance like other object-oriented languages.
Instead of inheritance, Golang promotes code reuse through composition.
Embedding structs in Golang allows for achieving similar behavior to inheritance.
Q10. What is Memory Management
Memory management is the process of controlling and coordinating computer memory, assigning portions called blocks to various programs.
Memory management involves allocating memory to programs when needed
It also involves deallocating memory when it is no longer needed
Memory management helps prevent memory leaks and optimize memory usage
Examples include dynamic memory allocation in C/C++ using functions like malloc() and free()
Q11. memory mamangment in python
Memory management in Python involves automatic memory allocation and deallocation through garbage collection.
Python uses automatic memory management, meaning developers do not need to manually allocate or deallocate memory.
Python's garbage collector automatically reclaims memory by detecting and removing objects that are no longer in use.
Memory leaks can still occur in Python if circular references are not properly handled.
Using tools like memory profilers can help identify a...read more
Q12. Features of pytest
pytest is a powerful Python testing framework.
pytest provides a simple and intuitive way to write tests.
It supports test discovery, fixtures, parameterization, and test execution.
pytest allows for easy integration with other testing tools and frameworks.
It has a rich set of plugins and extensions for additional functionality.
pytest supports running tests in parallel for faster execution.
It generates detailed test reports and supports test coverage analysis.
Q13. Code sorting algorithm
Implement a code sorting algorithm for an array of strings.
Use built-in sorting functions like sort.Strings() in Go.
Implement custom sorting functions using interfaces like sort.Interface.
Consider the time complexity of the sorting algorithm used.
Q14. Libraries used in testing?
Common libraries used in testing include JUnit, TestNG, Selenium, Appium, and RestAssured.
JUnit
TestNG
Selenium
Appium
RestAssured
Q15. write a polymorphism code ?
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
Create a superclass with a method
Create multiple subclasses that inherit from the superclass and override the method
Use the same method name to call the method on objects of different subclasses
Interview Process at Dr. Reddy's
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month