interview questions

 NEW T GLOBAL :

  1. CASE STATEMENTS IN SQL.
SELECT product_name, CASE WHEN price < 10 THEN 'Cheap' WHEN price BETWEEN 10 AND 50 THEN 'Moderate' WHEN price > 50 THEN 'Expensive' ELSE 'Unknown' END AS price_category FROM products;
  1. WRITE INNER JOIN INSQL.
SELECT orders.order_id, customers.customer_name, orders.order_date, orders.order_total FROM orders INNER JOIN customers ON orders.customer_id = customers.customer_id;
  1. WRITE INNER JOIN USING C# LINQ.
from order in orders join customer in customers on order.CustomerID equals customer.CustomerID select new { OrderID = order.OrderID, CustomerName = customer.CustomerName };
  1. CREATE CLASS & ABSTRACT CLASS EXPLAIN ITS DIFFERENCE.
  2. HOW INHERIT ABSTACT CLASS TO CLASS.
  3. INTERFACE VS ABSTRACT CLASS.
  4. Use sealed class.
      sealed class is not  not base class,we cant inherit it.
  1. IF A ABSTACT CLASS CONTAIN A VARIABLE AND A METHOD HOW TO ASSIGN VALUE TO VALRIABLE USING THAT METHOD.
  2. WHAT ARE  THE METHODS CONTAINED IN STARTUP.CS AND ITS USES.
  3. HOW SEND DATA FROM ANGULAR SERVICE TO WEB API.
  4. difference  between static and const key words.
This means that a static member can be accessed without creating an instance of the type.
the const keyword is used to declare a constant value that cannot be changed at runtime
  1. this keyword use in c#.
public class MyClass { private int x; public void SetX(int x) { this.x = x; } }
  1. what is serialization.
In C#, serialization is the process of converting an object into a format that can be stored or transmitted
-----------------------------------------------------------------------

SIS :

  1. Explain project.
  2. Can we do api call with out service class.
  3. Using normal class file can we do call api.
  4. Use provides in angular.
  5. WHAT ARE  THE METHODS CONTAINED IN STARTUP.CS AND ITS USES.
  6. Inside controller can we call third party api.
  7. How to filter more rows in sql table.
  8. If we pass to null value to filter data in sql then is it get any error or what type of data it returns.
  9. How validate data in angular.
  10. If date we call web api in that we pass date format which is not matching web api what error it will get and where it shown error message.
--------------------------------------------------------------------------
FirstAmerica :  
      1) Promise vs Observable.
      2) with out injectable can we do service calls.
      3) decorators usage in angular.
      4) directives in angular.
      5) type of Bindings in angular.
      6) interceptors and its usage.
      7) Abstract class and how do we inherit it.
      8) A sync and await.

"async" is a keyword used to declare a function as asynchronous. An asynchronous function is one that can run concurrently with other code and may not return immediately. When you call an asynchronous function, it returns a promise immediately, and the function continues running in the background until it finishes. The promise can then be used to handle the result of the asynchronous operation.

"await" is a keyword used to pause the execution of an async function until a promise is resolved. When you use "await" with a promise, the async function waits until the promise is resolved before continuing execution.

      9) oops in c#.
    10) is multiple inheritance support in c#.
    11) Sql query to get min second salary.
SELECT MIN(salary) AS min_second_salary FROM employees WHERE salary > ( SELECT MIN(salary) FROM employees );
     12) azile methodology ,sprint,team size.
     13)

class Program
{
static void Main(string[] args)
{

A obj1 = new B();
obj1.a1();

 

Console.Read();
}
}

 

public abstract class A
{
public abstract void b1();
public virtual void a1()
{
Console.WriteLine("Hi you are in class A");


}

}
public class B : A
{
public override void b1()
{
Console.WriteLine("Hi you are in class B");
}

}

output:  Hi you are in class A

Ans : virtual method it calls of base class if no over ride for it.

--------------------------------------------------------------------------
CGI:

1)How to sort array value in c#.
https://www.google.com/amp/s/www.geeksforgeeks.org/different-ways-to-sort-an-array-in-descending-order-in-c-sharp/amp/
// declaring and initializing the array
int[] arr = new int[] { 196759 };
 
int temp;
 
// traverse 0 to array length
for (int i = 0; i < arr.Length - 1; i++)
 
    // traverse i+1 to array length
    for (int j = i + 1; j < arr.Length; j++)
 
        // compare array element with
        // all next element
        if (arr[i] < arr[j])
        {
 
            temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
 
// print all element of array
foreach (int value in arr)
{
    Console.Write(value + " ");
}

2)how to prevent page navigation in middle of insertform angular.

2) canactivate() vs canload()

3)how to pass data in httpget Method to do insert updation.
(Ans) No, it is not appropriate to use the HTTP GET method to perform an insert operation. The HTTP GET method is intended for retrieving resources from a server, not for modifying them.

Instead, the appropriate method for inserting new resources into a server is the HTTP POST method. The POST method is designed for submitting data to a server for processing and can be used to create new resources on the server.

So, to perform an insert operation, you should use the HTTP POST method instead of HTTP GET.

4)difference between post,put,patch.

5)what approch used in .netcore to connect database.

6)global exception handling in c#.

7)difference between .Tostring(),convert.tostring()
(ans): ToString() can't handle null while in case with Convert.ToString() will handle null value.

2nd attempt 8) interceptor, 
                     9) secure api with token, 
                     10make  string reverse

GEP:
1) convert base64 to json
2) how do u modifi view
3) use of unique key
4) how to wait for response if api taking more time.
5) types of dependency injection,uses of it.
6)singleton vs scopped vs transiant
 7) design pattern.
8)middleware in .net. 
9)web api return types.
2nd round:
   Solid principals .
   Dependency injection and its types.
   Singletone  vs scopped vs transiant.
   Can we have multiple  catch blocks.
   Polymorphism .
   Abstract class vs interface real time scenario       in application.
   Print count of repeated values.
   Use of async pipe in angular.
   Subject vs behaviorsubject.
   Use of set keyword in ES6
   

tcs angular devrole:
---------------------------
dom sanitization
candeactivate 
interceptors
jasmin & karma
pass data from one array to another
absolute ,relative css






1) Read only,static,const,var,dynamic
2)static method,non static method
3)middile ware
4)scopped,singletone,transiant.
5)protected,private,public,internal
6)types of dependency injection
7api method return types.
8)ienumarable,iquarable
9)deligates
10)ado.net
11)sql
12)

what is bootstraping.
task vs thread.
why and where we use thread.

temptable and tempvariable.
cursors


sql
---
1) Tell me about your work experience ?
2) What are different types of joins in SQL?
3) Explain the difference between INNER JOIN and LEFT JOIN.
4) What is a self-join and when would you use it?
4) How do you optimize join performance in SQL queries?
5)Can you give an example of using CROSS JOIN?
6) given Table A ( 1,2,3,4,5,6) and Table B ( 1,2,3,4 ) . write a query on all the joins .
7) What are window functions in SQL?
8)How do you use the ROW_NUMBER() function?
9)Explain the difference between RANK() and DENSE_RANK() functions.
10)What are the advantages of using window functions over traditional aggregate functions?
11) Can you give an example of using the LAG() or LEAD() function?
12 ) find out 2nd highest salary with given employee table .
13) Find the distinct customer from sales table without using Distinct .
14)What is a Common Table Expression (CTE)?
15) How do you define and use CTEs in SQL queries?
16)Explain the difference between CTEs and temporary tables.
17)Can you name some scenarios where CTEs are useful?
18)How do you improve CTE performance in SQL Server






Design Patterns

Project Architecture

Test SQL procedure performance approach

Maintaining cache in project

WCF services

Database handling in applications(EF or ADO)

Difference between Viewresult and actionresult

Bundling minification

MVC life cycle

Routing mechanism

What is the use of partial view

Types of action filters

What is authentication and authorization filters

Session usage

Difference between tempdata and viewdata

Web api

What type of approach you will follow waterfall or agile

Using keyword

Static constructor

Lambda expressions

Jquery onchange 

Delegates

Multiple inheritance

Multi level inheritance

Where can we use new keyword

Indexing database

How to change bg of span inside div

Anonymous

Procedure inside procedure

Model binding

Rest Api

Jquery on change

Sealed keyword

Tabular execution takes time

Inproc and Outproc

Tuples

Asp.net page render

Scaffolding

SQL errors of installed SQL in pc

As.net authentication

Threading concept

Unsafecode

Sitemap

Post back

Wcf service data contract

Asp.net Session state

Polymorphism

Encapsulation

Json in project

Triggers

Reverse of number without using array

View state

Average SQL query

Find  not in both arrays 

Partial class

Hashset, Icollection, Ienumerable

Enumerable

EF db first

WCF Message Exchange Integration

Data Contract without usage

Abstract class inside constructor

Strongly typed view

SQl view

Polymorphism

Dynamic  polymorphism

Knockout js usage

Java script diff == and ===

Icompare or comparable

How to use multiple model classes in a view

Interface constructor

At the time of search in application which one Icollection, Ienumerable, Hash set

Executenonquery vs executereader vs executescalar

Viewbag vs viewdata

Cursor and triggers

Asp.net session management

Generic classes

How to access one project class into another project like class library project and services project

Full Join

TempData keep and peek

Child action in mvc

Url rewriting vs url routing

Print second largest number in integer without using inbuilt function

Find consecutive number count in a ascending order numbers

Print matrix triangle and reverse

Attribute, property and field in c#

Attribute routing

Diff model and Model

Bind values to drop down list

Drop down list for attributes

Custom helpers

Dynamic polymorphism 

How to insert large data into database

How to find div data elements inside multiple div

Interface usage in regular app real-time scenario

Update gender m as f in employee table

Dataset filling 

Global.asax file usage

Action filter and their methods

Is it possible to pass session data as data table in MVC

How to maintain session data

How to handle exception log

Json usage in project

Named parameters and optional parameters

Abstract and interface real usage

Base class of .Net framework

Wcf service fault contracts

Jquery selectors

Validations in jquery

Try and try pass

Tostring base class

How to call webservice or wcf rest api using web api’s

Call webservice using jquery

Extension methods

Model validations and display text in view

Work process

Application pool

Session and application

Passing values from one form to another form using windows application

Fault contracts in wcf

Class can inherit multiple abstract classes

Interface can inherit class a nd b

Html closures

Where can we place JS files in html page performance

String and stringbuilder diff

Abstract and sealed difference

Status codes 

Output cache 

Webapi output cache response

Use of stored procedures

Project architecture

Db first model changes

Repository pattern

Connection pooling

Xslt

Secure wcf services

 Mime type

Pdf download

Two way binding

Override vs overridable

Var vs dynamic

Data annotations

Service behaviours in wcf

Anonymous types

Ssis usage

File result

SSRS usage

Boxing nd unboxing

Stack vs heap

Is vs As

How to improve store proc performance

Overriding

Virtual

Functions vs procedures

Clustered and nonclustered indexes

Virtual and abstract usage

Cte tablets

Gac usage

Custom html helpers

Linq with where order by group by

Without controller and action method by giving action method it will call controller nd action

Circular prime

Convert numeric to alphabets and find length

Skip alternative string exclude white spaces between strings

Find 5* difficult words + 3* easy words consonants and vowels i

Diff b/w dynamic and generic

How to call stored proc from ur application

Diff b/w WCF and SOAP

How to do delete operation in your application

Why you use knockout Js in ur application

How you use XML in ur application

Have you used any dynamic keyword in ur application

How to List out only Even Numbers from a List of Integers using Lambda Expression in C#

Difference between $.get , $.post and $.ajax, uses of them

Using 2 variables to get the Fibonacci series

Why are we use abstract and interface ? when both of them have abstract methods.

Difference between select into vs insert into

Difference b/w inline query , stored procedure

How many ways to parse a model object from view to controller

Write a LINQ query with sum of salary.

Write a sql query using SELECT, WHERE, GROUPBY, HAVING, ORDERBY /  order of these.

What is Httphandler

What are the Authentication modes

Difference b/w iframe and partial view

Which is loading first html or javascript.

Difference b/w api controller & controller

Why are we use JSON 


Write query for 4th highest salary 


select * from (select DENSE_RANK() over (order by Salary desc ) as rn, Salary from Employee )t where rn=4 


Or


select * from Employee E1 where (select count(distinct E2.Salary) from Employee E2 where E1.Salary >= E2.Salary) = 4


Difference b/w   

public static String Name { get;set; }  

public static String surname; 


Disadvantages of DB First

Difference b/w MVC 3 , 4 & 5

What are the Bundling & Minification - bundling separation 

Reverse a string  “AMERICA”

Swap 2 variables

What is the Dependency Injection & Uses

Difference b/w IEnumerable & IQueryable 

Uses of ref and out parameters

Attribute routing 

Globalization and Localization

Diff Varchar and NVarchar

Synchronization and Asynchronization

Print the factorial number 

Sorting a number without using linq

Manage duplicates in Linq 

Sql query for find the odd, even numbers


Tuples
Asp.net page render
Scaffolding
SQL errors of installed SQL in pc
As.net authentication
Threading concept
Unsafecode
Sitemap
Post back
Wcf service data contract
Asp.net Session state
Polymorphism
Encapsulation
Json in project
Triggers
SQL null=null
XML to web form
YEAR in SQL server
String reversing with substring appending


7 yrs :


Abstract vs interface

Overloading and overriding

Febonacci

Cors policy

Content negotiation in web api

End point large data handling

Enumerable vs iqueryable

Encapsulation

Static variables

Types of reference types

Ref vs out 

Method hiding

Private class method access outside - Reflection

Ihttpactionresult

Attribute routing

Different types of return types on wcf

Diff bw wcf return types vs webapi return types

Ref types in c#

Injectable service - DI in angular

Event types in angular

Types of binding

Protected vs internal

Directives in angular

Extension methods in c#

Diff bw ienumerable and Ienumerator

Inheritance Aa new B()

Static constructor inside normal class

Metadata

Diff directive and Component

Multiples of 5 using linq

Abstract vs interface in ur code

Muti entity creation

Dictionary vs key value pairs

Runtime polymorphism

What is msal

Diff bw take and takewhile

How to call interface methods using multiple inheritance

Exception handling in your project

Use of private constructor

Constant and readonly

Readonly vs variable

How to create custom attribute routing in webapi

Inline template calling in angular 

Calling child component return value into parent component

Directive vs component

What is Pipe in angular

401 error

dbcontext

sql execution plan

perfomance tuning

lazy loading

token based authentication

constructor chaining

diff b/w exception & exception ex

https://alligator.io/angular/dependency-injection-angular/

Async and await

What is meta data

Reflection

Custom directives

Lock in singleton

Tuple

Web api security

Generics

Mvc routing

Solid principles

ADO.net use

Data reader

Constructor overloading

Abstract class

Error logging types

Is it Singleton thread safe

Encapsulation in ur project

Explicit interface and implicit interface

Yield

Hallmark

Partial class

Triggers syntax

Diff bw union and union all

Event vs delegates

Asp.net page life cycle

Is it possible create generic class

Find duplicates

Select * from employee where empid=empid

Select * from employee where empid=1 and empid=2

Select null=null

Sql injection

State management in asp.net

Types of comments

Index in sql

Primary key vs union key

Deadlock in c#

Types of delegates

Ado.net components

String immutable

View encapsulation

Default session in asp.net and maximum session

Diff bw local and global temp tables

Is postback

Use of viewstate enabled

Server side validations in asp.net

Coupling in c#

How many catch blocks we can create in a method or class

Is it possible to create only try without catch block

Diff bw class and struct

How to declare int value in javascript

Type safe

Use of delegates

Use of CTE

Jagged arrays

Context of in c#

Serialization vs deserialization

Diff bw soap and rest api

What is multi layered and multi tier architecture

Async and await

Compiler vs interpreter

why private class

extensionmethods 

copy constructor 

wn we will go for abstract class among interface

diff b/w var & dynamic

diff b/w collection and generic collection

 

how to pass data from controller to view

 how to restrict from frontend wn giving reqest to specific controller

use of attribute based routing

tempdata

filters


what is globals in sql

Is vs as in C#

Form group vs form control

Package.json usage

Guards in angular

Safe route in angular

Composite primary key

Restrict method overloading

Update affected count using c#

Use of stored procs

How to call same method name in 2 interfaces

Factory and services

Select vs selectmany

Attribute routing in mvc

Is it possible to call same action name multiple times

Var vs dynamic

Difference between encapsulation and abstraction

Composition vs decoupling

Proto type

How to restrict inheritance

Is js having any data types

Dispatcher in xml

Data template vs control template

Cross join in linq

list<int> vs int[]

ES6 vs typescript

Promises in angular

View child in angular

Types of custom directives in angular

Merge in sql

Sequence in sql

Pass one component to another component in angular 

Promises in jquery

Ngtemplate vs div and ngcontainer use in angular

Use of CTE

Extension functions in c#

Dependency injection

Observables vs promise in agular

 Template variables , template services in agulr

Bootstraping in angular

Subject in angular

Window service process attacher

Web api versioning

How to say rest api 

Register directives and service

forRoot() vs providedin:rooot angular

Use of main.js in dist

Find third highest sal using sql

Cte expression

Use of ngDocheck()

CSRF Attack

Antiforgery token

Diff bw mvc and webapi

Diff bw ngmodel vs propertybinding vs interpolation

Can observable is synchronous

Diff bw map and subscriber

What are keypoints that you observe to improve application performance

Array Reduce in angular

Post vs put

Angular library

How to call all methods at a time using c#

Mutex in EF

Thread pool in c#

Effects in jquery

Cte vs table variables vs temptable

Cross scripting security 

Glimpse in c#

Predicate in c#

Generics in C# use of it

Singleton in c#

Directives in angular

How to sort an muti dropdown values in angular

How to differentiate the action filter methods

Difference parse vs try parse 

What is called circular reference

C# generics

Named params and optional params

How can you pass optional params to web API

Find duplicates in intlist programme

Run time polymorphism example

Reverse of integer values


Command Design Pattern


Open Text:

OOP Concepts

Design Patterns

Program to display alternative character Uppercase “Modem” – char.ToCharArray()

CompressString("kkkktttrrrrrrrrrr") count same char count and display

Linq Group by ["abc", "xyz", "klm", "xyz", "abc", "abc", "rst"] → ["klm", "rst"]

Tag helper

Appbuilder.Run

Appbuilder.use()

CustomAction name()

Diff b/w rest and soap

Exception handling

Error Handling

conventional routing vs attribute routing

ACID principle

CTE, Clustered and Non Clustered

Multiple Inheritance, Method overriding

Abstract and override 

.net core basics


TCS

.netcore platform independent

.net core vs .net framework

How singleton is threadsafe

Delegate vs callback()

Lazyloading EF

Transient, scoped and Singleton 

DI

Factory design pattern

Anti Forgery Token vs JWT token

If I’m using conventional and attribute routing which one executes

IEnumerator vs IEnumerable

Why factory design pattern required


InteQ systems

Lipskov substitution principle example

Open close principle example

OOPS concepts

One on one relation (DB)

SOLID Prinicples

Design Patterrns

Table valued constructor(DB)

Async,await vs Task await

Char vs varchar

One to many and many to many 

Composite key(DB)

merge(DB)

Cross join

Full Join

Why webapi endpoint always async await

Recursive CTE


Experian

Kafka challenges

How to know the class if having same interface for 2 classes

Put vs patch

What is factory design pattern

What type of category factory design pattern(structural or behavioral)

Creational pattern example

How to return 2 async calls data in single async method



Comments