Add office photos
Employer?
Claim Account for FREE

RoadZen Technologies

2.6
based on 10 Reviews
Filter interviews by

10+ Maa Sharda College of Nursing & Paramedical Sciences Interview Questions and Answers

Updated 5 Feb 2024

Q1. There is an array of n element which contains 0 to n-1 elements in it. You have to find the repeated element and the missing element from the array.

Ans.

Find the repeated and missing element in an array of n elements containing 0 to n-1 elements.

  • Create a hash table to keep track of the frequency of each element.

  • Iterate through the array and update the hash table.

  • Find the element with frequency greater than 1 as the repeated element.

  • Find the missing element by subtracting the sum of array elements from the sum of 0 to n-1 elements.

  • Return the repeated and missing elements.

Add your answer

Q2. Why do we use react when there is more advanced framework like Angular exist?

Ans.

React is more lightweight and flexible than Angular, making it ideal for smaller projects or those with less complex requirements.

  • React is easier to learn and use than Angular, making it more accessible to developers of all skill levels.

  • React's virtual DOM allows for faster rendering and better performance than Angular's two-way data binding.

  • React's component-based architecture makes it easier to reuse code and maintain consistency across a project.

  • React has a larger and more...read more

View 1 answer

Q3. What is the reconciliation process being used in react?

Ans.

Reconciliation process is used by React to update the DOM efficiently.

  • Reconciliation is the process of comparing the new virtual DOM with the previous one to identify the changes.

  • React then updates only the necessary changes to the real DOM, instead of re-rendering the entire page.

  • This process helps in improving the performance of the application.

  • React uses a diffing algorithm to compare the two virtual DOMs and identify the changes.

  • The diffing algorithm is optimized to reduc...read more

Add your answer

Q4. How does a website get loaded on the browser?

Ans.

A website gets loaded on the browser through a series of steps including DNS resolution, HTTP request, server response, rendering, and scripting.

  • The browser sends a DNS request to resolve the website's domain name to an IP address.

  • The browser sends an HTTP request to the server for the website's resources.

  • The server responds with the requested resources, including HTML, CSS, JavaScript, and media files.

  • The browser renders the HTML and CSS to display the website's content.

  • The ...read more

Add your answer
Discover Maa Sharda College of Nursing & Paramedical Sciences interview dos and don'ts from real experiences

Q5. What are the life cycle methods exist in react?

Ans.

React has three main life cycle methods: Mounting, Updating, and Unmounting.

  • Mounting: constructor(), static getDerivedStateFromProps(), render(), componentDidMount()

  • Updating: static getDerivedStateFromProps(), shouldComponentUpdate(), render(), getSnapshotBeforeUpdate(), componentDidUpdate()

  • Unmounting: componentWillUnmount()

  • Examples: componentDidMount() is used to fetch data from an API, componentWillUnmount() is used to clean up any resources used by the component before it ...read more

Add your answer

Q6. How can we create a stateful functional component?

Ans.

A stateful functional component can be created using the useState hook in React.

  • Import the useState hook from React

  • Declare a state variable using the useState hook

  • Use the state variable in the component

  • Update the state variable using the setState function

  • Example: const [count, setCount] = useState(0);

  • Example:

Add your answer

Q7. What is shadowing in javascript?

Ans.

Shadowing in JavaScript is when a variable declared within a certain scope has the same name as a variable in an outer scope.

  • Occurs when a variable in a local scope has the same name as a variable in a parent scope

  • The local variable takes precedence over the parent variable within the local scope

  • Can cause confusion and unexpected behavior if not handled properly

Add your answer

Q8. Why is life cycle of react component?

Ans.

React component life cycle defines the stages of a component from initialization to destruction.

  • React component life cycle consists of three phases: Mounting, Updating, and Unmounting.

  • Mounting phase includes constructor, getDerivedStateFromProps, render, componentDidMount methods.

  • Updating phase includes getDerivedStateFromProps, shouldComponentUpdate, render, getSnapshotBeforeUpdate, componentDidUpdate methods.

  • Unmounting phase includes componentWillUnmount method.

  • Life cycle m...read more

Add your answer

Q9. Why 0.1+0.2 is not 0.3?

Ans.

Floating point arithmetic is not exact, hence 0.1+0.2 may not be exactly 0.3.

  • Floating point numbers are represented in binary, which can lead to rounding errors.

  • 0.1 and 0.2 cannot be represented exactly in binary, hence the result may not be exact.

  • This is not specific to JavaScript, but a general issue with floating point arithmetic.

  • To avoid such issues, use libraries like decimal.js or round off the result to a certain number of decimal places.

Add your answer

Q10. What is event loop?

Ans.

Event loop is a mechanism that allows JavaScript to handle multiple tasks simultaneously.

  • Event loop is a part of JavaScript runtime environment.

  • It continuously checks the call stack and the task queue.

  • If the call stack is empty, it takes the first task from the queue and pushes it to the call stack.

  • Examples of tasks include user input, network requests, and setTimeout() functions.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Front end Web Developer Interview Questions from Similar Companies

4.5
 • 12 Interview Questions
View all
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
Get AmbitionBox app

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