0% found this document useful (0 votes)
133 views3 pages

Interview Qestions - Without Answers

The document contains interview questions related to various programming technologies including C#, .NET, SQL, Angular, TypeScript, and JavaScript. Some of the questions focus on object-oriented principles, multithreading, asynchronous programming, database querying and performance, authentication and authorization in Angular applications, and reactive programming patterns.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views3 pages

Interview Qestions - Without Answers

The document contains interview questions related to various programming technologies including C#, .NET, SQL, Angular, TypeScript, and JavaScript. Some of the questions focus on object-oriented principles, multithreading, asynchronous programming, database querying and performance, authentication and authorization in Angular applications, and reactive programming patterns.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Consolidation of Interview Questions

C# and .Net

1. you have requirement to build the Air Conditioner for LG and Hitachi. Which has Common
features such as On, Off, Swing, Temperature control. While few features are specific.
LG- wants Inverter control
Hitachi- Air purifier and Mosquito Repellent.
How would you frame the classes, Interfaces, Abstract classes and SOLID principle to solve
the problem. We can also ask similar for Cars, Refrigerators, Vehicles

2. We can also ask how we can use factory pattern in implementing the logic of producing any
product as above AC.
3. If I have a dictionary and I have to do insert, update and fetch operation frequently
Dictionary is not thread safe what we can use instead which is thread safe.
4. If I have list of employee id and need to fetch details of employee using one API call i.e.
GetEmployee(int Employeeid). Here we if go one by one It will be slow operation. How we
can make it parallel and how we can restrict the no of threads.
5. Write a logic of reversing all the word in the sentence.

6. Given two input strings how can one determine number of different matching characters
that appear in both strings? E.g. var s1 = "abcdefghabcdefgh";  var s2 = "cdefcdefa"; and

7. Using ASP.NET Core application how would you return data as JSON from a controller
method?

Most reasonable answer is to define C# class and use it as response in the web method, and
automatic serialization will convert it to JSON. Other answers may include use of .Json()
method in the controller class or returning JsonContent class.

if you defined your own class that performs data access operations and you want to be able
to inject it into an ASP.NET controller, should you register your class as Singleton, Scoped, or
Transient? Explain.

8. How to configure ASP.NET Core application to use different configuration parameters such
as connection strings in different deployment environments?

9. DataManager class has GetData1Async() and GetData2Async() defined, each returning


collection of some C# entities. Assuming you have dataManager instance available to you,
how can you run these two methods concurrently, then continue execution when both
complete?

Code should look similar to this:

var dataResultTask1 = dataManager.GetData1Async();


var dataResultTask2 = dataManager.GetData2Async();
SQL

1. Billboard at a university lists students (one name per row), with associated courses
each student is taking as comma-separated text string (e.g. "Advanced Economics,
Social Studies Fundamentals, Algebra level II". Please design SQL schema for storing
this information.
2. If SQL Server query is performing slower than expected, how would you investigate
what is causing poor performance?
3. What are proper coding techniques to avoid SQL injection attacks while using stored
procedures or direct queries? How to implement when using Entity Framework or
without it (depending what candidate has in the resume).
4. How to apply filtering condition on a group value? For instance, query calculates
count of records per certain column value, but only results where count is greater
than 10 should be in the output.
5. SQL Server queries are usually case-insensitive when filtering strings. Is it possible to
make it case-sensitive?
6. I have 2 tables in SQL, Employee Table which has all the employee details. And
another is EmployeesLeft. If I want to select EmployeeId, Name, Address, Phone of
Employee which are at present in organization, how can I pull it?
7. If we have long list of ids in our C# for which we want to fetch data from Employee
table. How you will do it?
8. What is difference in syntax between Inner Join and  Left Join in Entity Framework

9. While creating non clustered index, We have option to select includes and few column.
When should we use that?

10. Should we use the inbuilt sql function such as ltrim, rtrim, substring in select query?

Angular/TypeScript/JavaScript

1. Explain how to implement authentication and authorization in an Angular


application.
2. What is the best way to compare two values in TypeScript or JavaScript?
3. What is the purpose of type "any" in TypeScript? When should you use it? How is it
different from type "unknown"?
4. I have page in which we have multiple components say 2. Personal Details, Busines Details.
Data of both the component stored as a single json in one table CustomerDetail. How can I
implement Auto save.
Example

{
  "personalDetail": {
    "name": "ABC",
    "address": "st paul US 380008",
    "Phone": "55584787"
  },
  "businessDetail": {
    "officialName": "OnterioHotels",
    "address": "Oakland,     CA38458",
    "Phone": "4565445454"
 }
}

5. When we have forms which has dropdowns which are loaded in cascading way example
Country -> Stage, Industry -> Category. If like on selection of country  we do api call to fetch
states and we get data and bind with dropdown of state, but some how it is not happening
correctly. How can you solve the problem.

6. Should we use let or var while declaring variables.

7. If we have multiple/2 api calls and both return observable so it is async. And once we get
response from both then only we want to execute the code further. How to do that.
Example
                Api/getcountries
                Api/getstates
                Method to create tree/hierarchy
8. If we have search box and want to do search as you type text. Here you need to do the API
call to bring the result. user may frequently change search keyword. if before completion of
older result a new search keyword is hit. There are possibilities of older result could come
after new result. How can we avoid it?

9. If we want to start search not immediately while user is typing, but when user stops typing
for few seconds. How we can achieve this?

You might also like