Add office photos
Employer?
Claim Account for FREE

Genpact

3.9
based on 29.7k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. What are indexes in the database? what is the difference between clustered and non-clustered indexes?

Ans.

Indexes are used to improve database performance. Clustered indexes determine the physical order of data, while non-clustered indexes do not.

  • Indexes are used to speed up data retrieval operations in a database.

  • Clustered indexes determine the physical order of data in a table, while non-clustered indexes do not.

  • A table can have only one clustered index, but multiple non-clustered indexes.

  • Clustered indexes are generally faster for retrieving large ranges of data, while non-clus...read more

Add your answer

Q2. what is a singleton pattern and how to implement it?

Ans.

Singleton pattern restricts the instantiation of a class to a single instance and provides a global point of access to it.

  • Create a private constructor to restrict instantiation of the class

  • Create a private static instance of the class

  • Create a public static method to access the instance

  • Ensure thread safety if necessary

  • Examples: Database connection, Logger, Configuration settings

Add your answer

Q3. How do you handle exceptions in stored procedures?

Ans.

Handle exceptions in stored procedures by using TRY-CATCH blocks.

  • Use TRY-CATCH blocks to catch and handle exceptions

  • Log the error message and severity level

  • Rollback the transaction if necessary

  • Rethrow the error if it cannot be handled

  • Use RAISERROR to raise custom error messages

Add your answer

Q4. Write a query to delete duplicate rows from a table.

Ans.

Query to delete duplicate rows from a table

  • Use GROUP BY clause to group the rows by their unique values

  • Use HAVING clause to filter out the groups with count greater than 1

  • Use DELETE statement to delete the duplicate rows

Add your answer
Discover null interview dos and don'ts from real experiences

Q5. Difference between throw and throw exception?

Ans.

throw is used to throw an exception while throw exception is used to throw a specific exception.

  • throw is used to throw any type of exception while throw exception is used to throw a specific type of exception.

  • throw exception is followed by the type of exception that needs to be thrown.

  • throw can be used to throw any object while throw exception can only be used to throw an exception object.

  • Example: throw new Exception("Something went wrong");

  • Example: throw ex;

Add your answer

Q6. Explain SOLID principles.

Ans.

SOLID principles are a set of five design principles that help in creating maintainable and scalable software.

  • S - Single Responsibility Principle: A class should have only one reason to change.

  • O - Open-Closed Principle: Software entities should be open for extension but closed for modification.

  • L - Liskov Substitution Principle: Subtypes should be substitutable for their base types.

  • I - Interface Segregation Principle: Clients should not be forced to depend on interfaces they d...read more

Add your answer

More about working at Genpact

Top Rated Mega Company - 2024
Top Rated Company for Women - 2024
Top Rated IT/ITES Company - 2024
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 Senior Software Engineer Interview Questions from Similar Companies

4.0
 • 43 Interview Questions
3.7
 • 33 Interview Questions
3.7
 • 13 Interview Questions
3.7
 • 13 Interview Questions
3.7
 • 12 Interview Questions
3.7
 • 10 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