Sunday, May 22, 2022

Senior developer Interview Questions

 

  1. What are the advantaged of using interfaces
  2. Difference between abstract class and encapsulation
  3. Can we have strings in enum? what is the default value and type, Can enum be long and short?
  4. What is managed, unmanaged code? give examples
  5. What is sealed class? Can I have abstract sealed class?-
  6. static const? Can I apply static to const?
  7. Can I use new modifier on static
  8. Sealed, Virtual, overide
  9. Difference between new and overrride
  10. this keyword on static class
  11. Can a virtual method have static
  12. Difference between dispose, finalize ( Used by Garbage collector)
  13. What are Anoymous method
  14. Difference between IQueryable and Ienumarable? HAve ou used Entity Framework
  15. linq - iqueryable-code side filter - performance, ienumerable, filter
  16. Difference between Thread and Task
Task is a background task. 
Use Task for quick operations
Execute task asynchronously and in parallel(multiple cores)
Task by default, uses CLR threadpool
Tasks support cancellation
Task supports: async,await keywords
Threads are expensive
Thread can be a foreground or background
  1. difference between Dependency Injection and IOC
  2. What is Transient, Scoped, singleton
  3. How is DI managed in .NET core
builder.Services.AddScoped<IMyDependency, MyDependency>()
asp.net core injects the instances of dependency classes by using builtin IOC container

Routing is he process of mapping an incoming http request to a specific method in our app code.
Attribute routing is used to create REST API endpoints for web services
It uses a set of attributes to map action methods to route templates

Action filters are used to implement logic that gets executed before and after a controller action executes.

What is common table expression
Common Table expression is a temporary named result set that you can reference with a SELECT, INSERT, UPDATE OR DELETE statement
WITH expression_name ([column_names..).]
AS
    cte query definition
Two types of CTE:
1. Recursive: Use recursive procedural loops
2. Non-recursive: CTE ddoesn;t use recursion
  1. Difference between Temp table and table variable:Temp table: supports transactions and error handling, DDL statements, table variable do not support transaction, error handling ddl statements, Tmp table is for big datasets, table variable is for small datasets
TABLE VARIABLE:
DECLARE @T ABLEVARIABLE TABLE(COLUMN1 DATATYPE, COLUMN2 DATATYPE)
TEMP TABLE:
CREATE TABLE {# | ##} TEMP_TABLE_NAME(DOLUMN DATATYPE OCNSTRAINT)

Triggers and types of triggers. Trigger is a piece of code executed automatically in response to a specific event occurrent on a table in a database, it is invoked before or after Insert, update delete, there are two types of triggers: row and statement level triggers. row level trigger executes each time a row is affected by an update statement. statement trigger is called once regardless of how many rows affected by the UPDATE statement
  1. What did you work on AWS? Have you worked with AWS lambda
  2. What is self join? join in which a table is joined with itself means each row of the table is combined with itself and with every other row of the table,
  3. What PMP tools have you used? I have used Trello, Asana, Jira, Google sheets
  4. var result = employees.Where(x1 => x1.Salary == employees.OrderByDescending(x => x.Salary) .Select(x => x.Salary).Distinct().Take(NthNumber) .Skip(NthNumber - 1).FirstOrDefault()).ToArray();

No comments:

Post a Comment