cloudEQ
10+ Saha Infratech Interview Questions and Answers
Q1. What is current project and what is tech stack used in it?
I am currently working on a web application for a retail company using React, Node.js, and MongoDB.
Developing a responsive UI using React and Redux
Implementing server-side logic using Node.js and Express
Storing and retrieving data using MongoDB
Integrating third-party APIs for payment processing and shipping
Writing automated tests using Jest and Enzyme
Q2. What is Dependency Injection and Is is implemented in project and How?
Dependency Injection is a design pattern used to remove hard-coded dependencies and make code more flexible and testable.
Dependency Injection is implemented by injecting the required dependencies into a class rather than creating them within the class.
This can be achieved through constructor injection, setter injection, or interface injection.
For example, in Java, Spring Framework provides a powerful dependency injection mechanism through its @Autowired annotation.
Dependency ...read more
Q3. Is Authentication implemented in project and if yes How?
Yes, authentication is implemented using OAuth 2.0 protocol.
OAuth 2.0 protocol is used for authentication.
Access tokens are issued to authorized clients.
Refresh tokens are used to obtain new access tokens.
Authentication is required for all API endpoints.
Q4. What are ref and out keywords? and What is the difference in them?
Ref and out are keywords used in C# to pass arguments by reference instead of value.
Ref and out are used to pass arguments by reference instead of value
Ref keyword is used to pass a reference of the variable to the method
Out keyword is used to pass a reference of the variable to the method and requires the variable to be initialized before use
Ref keyword can be used to modify the value of the variable passed as an argument
Out keyword is used when the method needs to return mu...read more
Q5. What is the difference in Interfaces and Abstract classes?
Interfaces define contracts for behavior while abstract classes provide partial implementation.
Interfaces cannot have implementation while abstract classes can have partial implementation.
A class can implement multiple interfaces but can inherit from only one abstract class.
Interfaces are used for loose coupling while abstract classes are used for code reuse.
Example: An interface 'Drawable' can define a method 'draw' which any class implementing it must define. An abstract cl...read more
Q6. Diifference in Value Type and Refence Type? Is String is Value Type or Reference Type?
Value types hold the data directly, while reference types hold a reference to the data.
Value types are stored on the stack, while reference types are stored on the heap.
String is a reference type in .NET.
Value types include int, float, and bool.
Reference types include arrays, classes, and interfaces.
Q7. What is Self Join in SQL Server? Give example
Self Join is a way to join a table with itself using aliases.
It is useful when we need to compare records within the same table.
It requires the use of aliases to differentiate between the two instances of the same table.
Example: SELECT a.name, b.name FROM employees a, employees b WHERE a.manager_id = b.employee_id;
Q8. What are Action Filters? Why these are used?
Action Filters are attributes that can be applied to controller actions to perform pre/post processing.
Action Filters are used to modify the behavior of controller actions.
They can be used to perform authentication, logging, caching, etc.
Action Filters can be applied globally or to specific actions.
Examples include [Authorize] for authentication and [OutputCache] for caching.
Action Filters can also be created by the developer to perform custom processing.
Q9. What is Interfaces? and Why these are used?
Interfaces are a way to define a contract between two objects, specifying the methods and properties that one object must implement.
Interfaces allow for loose coupling between objects, making it easier to change the implementation of one object without affecting others.
They promote code reusability by allowing multiple objects to implement the same interface.
Interfaces can be used to create mock objects for testing purposes.
Examples of interfaces in Java include Comparable, R...read more
Q10. What is Normalization in sql server?
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization involves breaking down a table into smaller tables and defining relationships between them.
There are different levels of normalization, with each level reducing redundancy and improving data integrity further.
Normalization helps to prevent data inconsistencies and anomalies, and makes it easier to maintain and update the database.
Examples of normalizatio...read more
Q11. What are delegate and how they are used?
Delegates are a type-safe function pointer used to encapsulate a method.
Delegates allow methods to be passed as parameters to other methods.
They can be used to implement callbacks and event handlers.
Delegates can be chained together to create a pipeline of method calls.
They are commonly used in .NET framework for event handling and LINQ queries.
Q12. What is shallow copy in C#?
Shallow copy creates a new object with same values as original, but references the same memory locations.
Shallow copy only copies the top-level object, not the nested objects.
Changes made to the original object will reflect in the copied object.
Use MemberwiseClone() method to create shallow copy of an object.
Example: int[] arr1 = {1, 2, 3}; int[] arr2 = arr1.Clone() as int[]; arr2[0] = 4; Console.WriteLine(arr1[0]); // Output: 1
Q13. Difference in Overriding and Overloading?
Overriding is when a subclass provides its own implementation of a method from the superclass, while overloading is when a class has multiple methods with the same name but different parameters.
Overriding is used to provide a specific implementation of a method in a subclass that is already defined in the superclass.
Overloading is used to define multiple methods with the same name but different parameters in a class.
Overriding is used for runtime polymorphism, while overloadi...read more
Q14. Difference in IEnumerable and IQueryable?
IEnumerable is in-memory collection while IQueryable is a queryable data source.
IEnumerable is used for querying data from in-memory collections like List, Array, etc.
IQueryable is used for querying data from a data source like a database.
IEnumerable executes the query on the client-side while IQueryable executes the query on the server-side.
IQueryable is more efficient when working with large datasets as it allows for filtering and sorting on the server-side.
Example: var lis...read more
Q15. Difference in String and String Builder?
String is immutable while StringBuilder is mutable.
String is a final class and its value cannot be changed once created.
StringBuilder is a mutable class and its value can be changed without creating a new object.
String concatenation creates a new String object each time, while StringBuilder is more efficient for concatenation.
Use String for fixed values and StringBuilder for dynamic values.
Interview Process at Saha Infratech
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month