Cognizant
Interview Questions and Answers
Q1. what is entity framework
Entity Framework is an ORM (Object-Relational Mapping) framework for .NET applications.
ORM framework for .NET applications
Maps database tables to classes in code
Provides a way to query and manipulate data using LINQ
Supports various database providers such as SQL Server, MySQL, etc.
Q2. what are solid principles
SOLID principles are a set of five design principles for writing maintainable and scalable object-oriented code.
Single Responsibility Principle (SRP) - a class should have only one reason to change
Open/Closed Principle (OCP) - classes should be open for extension but closed for modification
Liskov Substitution Principle (LSP) - objects of a superclass should be replaceable with objects of its subclasses without affecting the program's correctness
Interface Segregation Principle...read more
Q3. what are design patterns
Design patterns are reusable solutions to common problems in software design.
Design patterns provide a template for solving recurring design problems in software development.
They help in making code more maintainable, scalable, and efficient.
Examples include Singleton, Factory, Observer, and Strategy patterns.
Q4. what is CTE in SQL
CTE stands for Common Table Expression in SQL, used to create temporary result sets that can be referenced within a query.
CTEs are defined using the WITH keyword
They can be recursive or non-recursive
CTEs improve readability and maintainability of complex queries
Example: WITH cte AS (SELECT * FROM table_name) SELECT * FROM cte
Q5. Singleton, mutable vs immutable
Singleton is a design pattern that restricts the instantiation of a class to one object. Immutable objects cannot be changed after creation.
Singleton pattern is used to ensure only one instance of a class is created and provide a global point of access to it.
Mutable objects can be changed after creation, while immutable objects cannot.
Immutable objects are thread-safe and can be shared across multiple threads without the need for synchronization.
Examples of immutable objects ...read more
Q6. React js useMemo useCallback difference
useMemo is used to memoize the result of a function, while useCallback is used to memoize a function itself.
useMemo is used to optimize expensive calculations by caching the result and returning it when the dependencies don't change.
useCallback is used to optimize the performance of child components by preventing unnecessary re-renders when the dependencies don't change.
Both useMemo and useCallback accept a dependency array as the second argument to specify when the memoized ...read more
More about working at Cognizant
Interview Process at null
Top Senior Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month