Interview Preparation Questions

OOPS

  • What are the four pillars of OOPS? 
    • Abstraction
    • Encapsulation
    • Inheritance
    • Polymorphism
  • What are Abstraction and encapsulation? 
    • Abstraction is a process in which we will hide the implementation from the end user and only display the required and necessary information. 
      • Encapsulation is a process of wrapping up the data into a single unit. 
    • Abstraction can be implemented with the help of abstract classes and interfaces
      • Encapsulation can be implemented with the 
  • What is the difference between Interfaces and Abstract classes? 
    • An abstract class is a class in which we can have both abstract methods as well as concrete methods (here abstract method means, the method with the only declaration but no definition/implementation and concrete methods will have both declaration and definition).
      • The interface is also known as the pure abstract class because it can only contain abstract methods(methods with only declaration but no the definition
    • An abstract class can have data member/data methods with any access specifier 
      • An interface can only have a method with a public access specifier.
    • We can create the constructor of the abstract class but Interface cannot have a constructor.
    • Using abstract class we can't implement multiple inheritance but using interface we can implement multiple inheritance. 
  • When does the constructor of the abstract class get called?
    When the object/instance of the class is initialized during that time constructor is implicitly called by the compiler but as we know we cannot initialize the instance of the abstract class but if the abstract class has any children(means the abstract class is inherited by any other class) in that case whenever the child class instance in initialized during that time both child class and parent class(abstract class) constructor is been called.
  • what is inheritance and its types?
    • Inheritance is the process of acquiring one class property and class methods into the other class. the class from which the property will be inherited is known as the parent/super class whereas the class which will inherit the property is known as child/derived class. 
      • Single inheritance 
      • multilevel inheritance 
      • multiple inheritance 
      • hybrid inheritance
  • What is polymorphism and explain runtime polymorphism and compile time polymorphism?
  • one object has many forms or has one name with multiple functionalities. Polymorphism allows a class to have multiple implementations with the same name. It is one of the core principles of Object Oriented Programming

  • Explain class and object.
Read this on another blog click here to open

SQL Server

  • What are joins and brief about types joins? 
  • What are Indexing and its type?
  • What are triggers and their types? 
  •  What is normalization and its type? 
  • what is the difference between function stored procedure? 
  • what is transaction in SQL Server? 
  • Brief about different constraints in SQl
  • Difference between Primary key and unique key.
  • what is a view. 

Queries

  • Find the second Highest Salary,Employee Name from the employee table.
  •  

C#

  1. What is garbage collection explain? 
  2. what is CLR? 
  3. what is the difference between stack and heap memory? 
  4. difference between boxing and unboxing. 
  5. Difference between array and arraylist
  6. What is collection 
  7. What is reflection 
  8. what is extension function?
  9. What is difference between Method hiding and method overriding? 
  10. Difference between IEnumerable and IQuerable 

Design Pattern 

  • What is a design pattern?
  • What is Dependency injection?
    • Dependency injection is a design pattern that helps you to create a loosely coupled application where it will reduce the hard-coded dependency among the classes by injecting the required dependency over run time. 
    • there are three types of dependency injection:
      • Constructor (most commonly used ) 
      • Property
      • Method
    • Asp.net core support three type of dependency injection lifetime. 
      • Singleton: create and share a single instance of service throughout the application's lifetime.
      • Transient: create a new instance of the specified service type every time you ask for it.
      • Scoped: create an instance of the specified service type once per request and will be shared in a single request.         
  • what is a singleton? 

ASP.NET MVC 

  • What is the difference between ViewBag, ViewData, and TempData?
  • What is Routing and How routing works?
  • What is the different type of routing in MVC?
  • What are filters?
  • What is ActionMethod?
  • What is the different IActionResult in MVC?
  • Life cycle Hook
  • What are the different return types of a controller action method
    • ViewResult
    • JSONResult
    • EmptyResult
    • FileResult
    • ContentResult
  • What are the steps for the execution of an MVC project
    • Receive the first request for the application
    • Perform routing
    • Create an MVC request handler
    • Create Controller
    • Execute Controller
    • Invoke action
    • Execute Result
  • What is a partial view in MVC?
    • Partial view in MVC renders a portion of view content. It is helpful in reducing code duplication. In simple terms, the partial view allows rendering a view within the parent view.

  • What are filters in MVC?
    • Filters are used to execute custom logic before or after executing the action method. ASP.NET MVC provides filters for this purpose. ASP.NET MVC Filter is a custom class where we can write custom logic to execute that before or after an action method is executed.
  • Authorization Filter

    Authorization filters are used to implement authentication and authorization for controller actions. It implements the IAuthorizationFilter attribute.

    Result Filter

    Result filters contain logic that is executed before and after a View result is executed. For example, you might want to modify a View result right before the View is rendered to the browser. It implements the IResultFilter attribute.

    Exception Filter

    Exception filter is used to handle errors raised by either your controller actions or controller action results. You also can use exception filters to log errors. It implements the IExceptionFilter attribute.

Angular 

  • What are life cycle hooks in an angular component? 
  • What are decorators?
  • What are directives and their type (Component, Structural, Attribute)?  
  •  What is Observable and Promise? What is the difference between both? 
  • How does the Angular application works 
    • Starting point for the angular application is angular.json file in which all the configuration of angular app is defined. 
    • build will find the location of the main file from builder property "main".
    • from main.js file, AppModule gets bootstrapped  and AppModule.ts will invoke the AppComponent and the rest of the flow will be based on Application requirement. 
  • What is AppModule.ts?
    • Module.ts file consists of all declarations of components, imports all the other module to our application, and provides the services to all components. 
  • What is a component? 
    • Component is the basic building block of the angular application that represent the portion of the UI that will render over the UI whenever the component is called. 
    • Component class is decorated with @componet decorator have main three property 
      • Selector: used to access the component
      • Template: Contain HTML of the component. 
      • styleURL: Component-specific CSS
  • What is NgModule? 
    • NgModule helps to organize the angular application in one place such as all the components that need to be used will be declared inside NgModule, all the services need to provide and all the imports required. 
    • NgModuleModule will group all required components, service all in one place, and help to maintain the application.

Asp.net core 

  • Types of Authentication in Asp.Net
    • Form Authentication
    • Passport Authentication
    • Windows Authentication
    • Custom authentication Provider
      • Multipass
      • JWT (JSON Web token)
      • SAML (Security Assertion Markup Language)
  • What is data annotation and can we use data annotation for API model?
    • Data annotation is a library provided by Dot.Net to validate our model class. these are the set of attributes that be labeled over the classes or properties and those attributes will help our system to process the data inside that element according to the attributes label. 
    • Yes, we can use data annotation to validate our API model on the server side. 
  • What is Generics?
    • C# allows you to create the classes/method/property etc with the type parameter without specifying the data type that can be used inside them at compile time, So the type parameter will act as a placeholder that can be replaced by any datatype at run time.
  • What is Middleware?
    • Middleware is part of the request and response pipeline which handle the request and response before its actual execution. such as before executing the actual action method our application should check certain checks like the request is from a valid/authorized user or not, whether the user is an authenticated user of the application or not. And if the request failed between any middleware out request will be terminated and go through further checks and execution. 
    • the order of middleware is very important while setting up your application. 
    • Each middleware will process the request and pass the processed output to the next middleware

0 Comments