Add office photos
Employer?
Claim Account for FREE

Synamedia

3.5
based on 109 Reviews
Video summary
Filter interviews by

Dr Reddys Path Labs Interview Questions and Answers

Updated 5 Feb 2025

Q1. What are the steps to create a basic POST API that handles all possible errors? What is marshalling? Also write test cases for api. Discuss all http status codes you know.

Ans.

Creating a basic POST API with error handling, marshalling, test cases, and HTTP status codes.

  • Create a Node.js server using Express framework

  • Define a POST route that handles incoming requests

  • Implement error handling using try-catch blocks

  • Use marshalling to convert data between different formats (e.g. JSON to object)

  • Write test cases using a testing framework like Mocha and Chai

  • HTTP status codes: 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), 500 (Internal Se...read more

Add your answer

Q2. Given an array, how can you determine the frequency of a specific element and subsequently delete all occurrences of that element?

Ans.

Use JavaScript methods to determine frequency and delete all occurrences of a specific element in an array of strings.

  • Use the reduce method to count the frequency of the specific element in the array.

  • Use the filter method to remove all occurrences of the specific element from the array.

Add your answer

Q3. What is function overriding, and how is it implemented in JavaScript?

Ans.

Function overriding is a concept where a subclass provides a specific implementation of a method that is already provided by its superclass.

  • In JavaScript, function overriding can be achieved by defining a method in a subclass with the same name as a method in its superclass.

  • When an object of the subclass calls the overridden method, the subclass's implementation is executed instead of the superclass's.

  • This allows for customization and extension of behavior in subclasses while...read more

Add your answer

Q4. What is the process to create a basic connection to MongoDB?

Ans.

To create a basic connection to MongoDB, you need to install the MongoDB driver, set up a connection string, and use the MongoClient to connect to the database.

  • Install the MongoDB driver using npm install mongodb

  • Set up a connection string with the MongoDB URI

  • Use the MongoClient to connect to the database

Add your answer
Discover Dr Reddys Path Labs interview dos and don'ts from real experiences

Q5. Can you demonstrate inheritance in JavaScript?

Ans.

Yes, inheritance in JavaScript is achieved through prototype chaining.

  • In JavaScript, objects can inherit properties and methods from other objects through prototype chaining.

  • The prototype property allows objects to inherit properties and methods from another object.

  • Child objects can access properties and methods of their parent objects through the prototype chain.

  • Example: function Animal() {} Animal.prototype.eat = function() { console.log('Eating'); }; function Dog() {} Dog....read more

Add your answer

Q6. interchange 2 variable values , without using temporary variable

Ans.

To interchange 2 variable values without using a temporary variable, you can use arithmetic operations.

  • Use addition and subtraction to swap values without a temporary variable.

  • Example: If a = 5 and b = 10, you can swap them using a = a + b and b = a - b.

  • Make sure to handle potential overflow or underflow when swapping values.

Add your answer

Q7. what is the use of static

Ans.

Static is used to declare variables or methods that belong to the class rather than instances of the class.

  • Static variables are shared among all instances of a class.

  • Static methods can be called without creating an instance of the class.

  • Static keyword is used in Java, C++, and other programming languages.

  • Example: static int count = 0; // static variable

Add your answer

Q8. Parse json into an Object

Ans.

Use a JSON parser to convert JSON data into an object in a programming language.

  • Use a JSON library or built-in functions in your programming language to parse the JSON data.

  • Map the JSON keys to object properties for easy access.

  • Handle any errors or exceptions that may occur during parsing.

  • Example: Using JSON.parse() in JavaScript to convert a JSON string into an object.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Dr Reddys Path Labs

based on 17 interviews
Interview experience
3.8
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.7
 • 6.3k Interview Questions
4.1
 • 258 Interview Questions
3.9
 • 214 Interview Questions
3.7
 • 180 Interview Questions
3.9
 • 154 Interview Questions
4.1
 • 148 Interview Questions
View all
Top Synamedia Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter