Senior Developer

10+ Senior Developer Interview Questions and Answers for Freshers

Updated 2 Jul 2025
search-icon

Asked in Xerago

3d ago

Q. What is react js virtual dom? what is diff algorithm?

Ans.

React's Virtual DOM optimizes UI updates by minimizing direct manipulation of the real DOM, enhancing performance.

  • The Virtual DOM is a lightweight copy of the actual DOM, allowing React to manage changes efficiently.

  • When a component's state changes, React creates a new Virtual DOM tree and compares it to the previous one.

  • The diffing algorithm identifies changes between the old and new Virtual DOM trees, determining the minimal updates needed.

  • For example, if a list item is add...read more

5d ago

Q. Ask fewer questions about the 25 horses racing problem.

Ans.

Determine the fastest horse among 25 with minimal questions about their performance in a race.

  • Use a tournament-style elimination method to narrow down the fastest horses.

  • First, divide the 25 horses into 5 groups of 5 and race each group.

  • Identify the top 3 horses from each group, leading to 15 potential candidates.

  • Race the top 15 horses to find the fastest horse overall.

  • Consider using a ranking system to track performance across races.

Asked in GlobalLogic

4d ago

Q. What is the difference between a normal function and an arrow function, and can you provide an example?

Ans.

Arrow functions are concise syntax for writing functions in JavaScript, compared to normal functions.

  • Arrow functions do not have their own 'this' keyword, they inherit it from the parent scope.

  • Arrow functions do not have 'arguments' object.

  • Arrow functions cannot be used as constructors.

  • Arrow functions are more concise and easier to read compared to normal functions.

Asked in PwC

4d ago

Q. What is Hash map? What app did you build How do u maintain app life cycle

Ans.

A hash map is a data structure that allows for efficient storage and retrieval of key-value pairs.

  • A hash map uses a hash function to convert keys into array indices.

  • It provides constant-time average case complexity for insertion, deletion, and retrieval operations.

  • Hash maps are commonly used in programming languages and databases for fast data access.

  • Example: HashMap<String, Integer> map = new HashMap<>();

  • map.put("apple", 5);

  • int value = map.get("apple"); // returns 5

Are these interview questions helpful?

Asked in Xerago

5d ago

Q. How do you use useRef and useReducer?

Ans.

useRef and useReducer are React hooks for managing state and references in functional components.

  • useRef: Creates a mutable object that persists for the full lifetime of the component.

  • Example: const inputRef = useRef(null); <input ref={inputRef} />

  • useReducer: An alternative to useState for managing complex state logic.

  • Example: const [state, dispatch] = useReducer(reducer, initialState);

  • Combining both: useRef can hold a reference to a DOM element, while useReducer manages the s...read more

Asked in Xerago

4d ago

Q. How do you use useEffect in React JS?

Ans.

useEffect is a React Hook that allows you to perform side effects in function components.

  • useEffect takes two arguments: a function and a dependency array.

  • The function runs after the component renders, allowing for side effects like data fetching.

  • Example: useEffect(() => { fetchData(); }, []); fetchData is called once after the initial render.

  • If the dependency array contains variables, the effect runs again when those variables change.

  • Example: useEffect(() => { console.log(cou...read more

Senior Developer Jobs

SAP India Pvt.Ltd logo
AI Senior Developer 4-9 years
SAP India Pvt.Ltd
4.2
Bangalore / Bengaluru
Muthoot Fincorp Ltd logo
SENIOR DEVELOPER 3-10 years
Muthoot Fincorp Ltd
4.5
Chennai
SAP India Pvt.Ltd logo
Cloud AI Senior Developer - Bangalore 8-12 years
SAP India Pvt.Ltd
4.2
₹ 15 L/yr - ₹ 45 L/yr
(AmbitionBox estimate)
Bangalore / Bengaluru

Asked in Xerago

2d ago

Q. What is the hook system in React JS?

Ans.

React hooks are functions that let you use state and lifecycle features in functional components.

  • Hooks allow functional components to manage state using the useState hook. Example: const [count, setCount] = useState(0);

  • useEffect hook enables side effects in functional components, replacing lifecycle methods. Example: useEffect(() => { /* effect */ }, [dependencies]);

  • Custom hooks can be created to encapsulate reusable logic. Example: function useFetch(url) { /* fetch logic */ ...read more

Asked in TCS

2d ago

Q. Write a function that reverses a string.

Ans.

Reversing a string involves rearranging its characters in the opposite order, a common task in programming.

  • Use built-in functions: In Python, use `s[::-1]` to reverse a string. Example: 'hello' becomes 'olleh'.

  • Iterative approach: Loop through the string from the end to the start and build a new string. Example: 'abc' becomes 'cba'.

  • Recursive method: Define a function that calls itself with a substring until the base case is reached. Example: reverse('abc') = 'c' + reverse('ab'...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in GlobalLogic

6d ago

Q. Write an example of a closure.

Ans.

A closure is a function that has access to its own scope, as well as the outer scope in which it was defined.

  • A closure can access variables from its outer function even after the outer function has finished executing.

  • Closures are commonly used in event handlers, callbacks, and asynchronous code.

  • Example: const outerFunction = () => { const outerVar = 'I am outer'; return () => { console.log(outerVar); }; }; const innerFunction = outerFunction(); innerFunction(); // Output: 'I ...read more

Asked in Owen Media

3d ago

Q. What is the company's process?

Ans.

The company process involves a structured approach to project development and implementation.

  • The company follows Agile methodology for project management.

  • There are regular stand-up meetings to discuss progress and roadblocks.

  • Code reviews are conducted before merging to the main branch.

  • Testing is an integral part of the development process.

  • Documentation is maintained throughout the project lifecycle.

6d ago

Q. What is Redux?

Ans.

Redux is a predictable state container for JavaScript apps, enabling centralized state management and easier debugging.

  • Centralized State Management: Redux stores the entire application state in a single store.

  • Predictable State Updates: State changes are made through pure functions called reducers.

  • Actions: State changes are triggered by dispatching actions, which are plain JavaScript objects.

  • Middleware: Redux supports middleware for handling side effects, such as API calls (e....read more

Q. What happens when you dereference a null pointer?

Ans.

Dereferencing a null pointer means trying to access the memory location pointed to by a null pointer.

  • Dereferencing a null pointer can lead to a segmentation fault or access violation.

  • Example: int *ptr = NULL; int value = *ptr; // This will result in a segmentation fault.

Asked in HCLTech

4d ago

Q. What are goroutines in Go?

Ans.

Goroutines are lightweight threads managed by the Go runtime, allowing concurrent execution of functions.

  • Goroutines are created using the 'go' keyword followed by a function call.

  • They are multiplexed onto multiple OS threads by the Go runtime.

  • Goroutines communicate using channels to share data safely.

Asked in LERETA

4d ago

Q. Tell me about your experience with Angular.

Ans.

Extensive experience with Angular framework for building dynamic web applications.

  • Developed multiple single-page applications using Angular

  • Strong understanding of Angular concepts like components, services, modules, routing, and forms

  • Experience with Angular CLI for project setup and management

  • Familiarity with Angular Material for UI components

  • Knowledge of state management using NgRx or RxJS

4d ago

Q. What is your experience with Java?

Ans.

Extensive experience with Java programming language in various projects and applications.

  • Developed web applications using Java EE framework

  • Utilized Java for backend development in multiple projects

  • Experience with Java libraries and frameworks such as Spring and Hibernate

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Accenture Logo
3.8
 • 8.6k Interviews
Infosys Logo
3.6
 • 7.9k Interviews
Cognizant Logo
3.7
 • 5.9k Interviews
HCLTech Logo
3.5
 • 4.1k Interviews
View all
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Senior Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

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

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits