Advanced technical interview questions for 6+ years of experience.


Description - As our years of experience grows, we have to face tough and tricky questions at the time of interview. More questions are based on particular scenarios which help interviewer to evaluate candidates based on their approach for that questions and also analytical skills. I am giving few advanced interview questions here, it would be great if readers will share answers for these questions. It will be helpful for me as well as for other developers who are enhancing their skills.

C# /ASP.net/jQuery/MVC/.Net/Design pattern
1) What is the difference between string and string builder?
2) User control : How to do postback through web page?
3) What are and delegate events?
4) How to use delegate and event in user control?
5) MVC and asp.net difference. Why to choose MVC if ASP.net fulfils my project requirements?
6) Partial views and strongly typed view difference.
7) What is master page?
8) How to do javascript client side validation? Why we do validation at client side?
9) How to use jquery in textbox bind event?
10) How to use observer design pattern for user control?
11) How to implement singleton and façade pattern?
12) What are limitations of Open XML?
13) What is difference between a.equals(b) and a==b?
14) What is the performance issue in for loop?
15) What is Nuget?
16) If I want to do debugging in Jquery then which library I need to add in my project?
17) What is the yield and its purpose in C#?
18) Have you used any collections in C#? What is the purpose of using it?
19) How to find whether data is stored in stack or its in heap?
20) How registry is maintained?
21)What are advantages of Interop?
22) How to use satellite assemblies? Have you ever thought of using it in your project?
23) How to improve performance of code in C#? Do you follow any techniques?
24) What is publisher subscriber model? Any design pattern can be implemented for it?
SQL section:
1) What is the difference between truncate and delete?
2) How to count of inserted rows without select statement?
3) What is SQL bulk copy?
4) What is performance tuning in SQL?
5) How you can retrieve data which is case sensative using SQL query?
6) Are there any index present other than clustered and non-clustered index?
7) How to find employee's data alongwith its manager's data if you have table which has following columns empid , manager's id , name,salary, designation etc.


Comments

Author: Pawan Awasthi25 May 2013 Member Level: Gold   Points : 4

Hai Prachi,
Thanks for sharing such a nice collection for the questions. These questions will definitely be helpful for those who are preparing for the interview or have plan in preparation. As these are the small and tricky questions so it will be helpful in cracking the interviews for 5+ years experience guys and they can prepare in advance for these type of questions.
I will try to post the answers for these questions in the coming days..Guys, please keep watching this section for the answers in very few days..

Author: baskar27 May 2013 Member Level: Gold   Points : 3

Hello Pawan,

That's a good initiative that you have taken.

Is it possible to get scenario based questions ? Mostly covering on the design patterns.

If you see now a days the interview question more of scenario based and on design patterns.

If you have any url on these type of questions. Pls post it.

I will also try to find or will prepare and will post

Thanks in advance

Author: Pawan Awasthi28 May 2013 Member Level: Gold   Points : 2

Hai Baskar,
yes, you are right. Now a days companies are asking about the scenarios based questions if you are having 3+ yrs experience.
I will try to post such questions with the answer so that people can get benefit of it and they can respond to those answers in the interviews.

Author: Prachi Kulkarni31 May 2013 Member Level: Gold   Points : 0

Hi all,
Thanks for the response.
I will soon post PART 2 of "Advanced technical interview questions for 6+ years of experience".
I hope it will be useful to all.

Best regards,
Prachi.

Author: baskar31 May 2013 Member Level: Gold   Points : 10

1) What is the difference between string and string builder?

String:
a.It uses the the namespace "System"
b.It is immutable, meaning value will not be overwritten in the memory while assigning new value variable to the string. It creates a new memory space for storing the new variable.
c.It is sequential collection of Unicode characters for representing text
d.Additional memory will be allocated during concatenation.

StringBuilder:
a.It belongs to the namespace "System.Text"
b.It is mutable, meaning value will be overwritten in the memory while assigning new value variable to the string.
c.Cannot assign value directly to string.You need to create object


StringBuilder obj = new StringBuilder("Hello World");

d.During concatenation additional memory will allocated only if it exceeds buffer capacity.

3)What are difference between events and delegate?

Both delegates and events are tied together
Event:
1. It is the outcome of an action.
2. Event Source(Which raises the event) and receiver(object that responds to the event)are the two important terms
3. Delegate acts as a communication channel between Event Source and Event Source.

Delegate:
1.It is function pointer.
2.Delegate can call more than one function.
3.There are two types of delegates
(i) Single Cast
(ii)Multi Cast

//declaring delegate
public delegate void sample_delegate();
public void GoodMorning()
{
MessageBox.Show("Hello Friend" + "GoodMorning");
}
public void GoodEvening()
{
MessageBox.Show("Hello Friend" + "GoodEvening");
}
private void button2_Click(object sender, EventArgs e)
{
// instantiation
// Here we are calling two methods so it is multicast delegate
// If you call only one it is single cast

sample_delegate sd = GoodMorning;
sd += GoodEvening;
//invoking
sd();
}

5) MVC and asp.net difference. Why to choose MVC if ASP.net fulfills my project requirements?

MVC
a. No View State
b. No PostBack
c. Code and HTML are completely separated
d. Best Suited for large projects
e. Unit testing can be done easily.
f. Testing can be done with out invoking the view
g. Can easily plugin more jquery script than asp.net easily
h. Viewstate is not used for maintaining state information.
i. Increase the performance

ASP.NET
a. It follows 'page Controller' pattern. So code behind class play a major role in rendering controls
b. You cannot do unit testing only for code behind alone. You need to invoke view to do testing
c. It manages the state by using view state and server based controls.
d. HTML Output is not clean


6) Partial views and strongly typed view difference.

Patial Views:
These are sub-views or reusable views
Whenever we want to reuse the views we can go in for partial views.
Examples of reusable views are header and footer views where we will be using it across the application.
To achieve reusable views partial views are created.
It is light weight.

Strongly Typed Views

It is used for rendering specific types of model.
It inherits from ViewPage (T --> Type of the model)


7) What is master page?
Master Page is used in web application
We can say master page as a template for the other pages in our project.
For creating a constant look and feel for all our pages in web application.
It acts as a placeholder for the other pages or content.
If a user makes a request to a webpage it merges with masterpage and will provide the output .

Author: baskar03 Jun 2013 Member Level: Gold   Points : 8

8) How to do javascript client side validation? Why we do validation at client side?

The below code is to do client side validation

 
function samplejavascript()
{
alert('Hello World');
}

In order to increase the performance of web application and to avoid post backs. So validation are done at client side.

12) What are limitations of Open XML?
OpenXML in SQL haS the limitation of storing values upto 8000 characters only

13) What is difference between a.equals(b) and a==b?

“==” --> It compares reference
"Equals" --> It compares object by VALUE.


15) What is Nuget?
It is Visual Studio extension and a opens ource project
By using Nuget we can easily add,update and remove libraries in Visual Studio Projects.
When you add or remove a library it copies/removes necessary files to your application.
It is a quick way to add reference to our application.

16) If I want to do debugging in Jquery then which library I need to add in my project?

To debug jQuery code in IE using Visual Studio debugger.Add the keyword "debugger" where you want to debug

function samplejavascript()
{
debugger;
alert('Hello World');
}


18) Have you used any collections in C#? What is the purpose of using it?

Yes i have used collection in c#.
It is uses the namespace "System.Collection".
It is a specialized classes for data storage and retrieval.
It is type safety and increases performance.

Commonly used collections are
a.ArrayList
b.Hashtable
c.SortedList
d.Stack
e.Queue
f.BitArray


19) How to find whether data is stored in stack or its in heap?

Both are stored in the computer’s RAM (Random Access Memory)
Value types are stored in stack and stored in sequential (LIFO).
Objects are stored in Heap and data are stored randomly

Some additional points:-
Stack is much faster than heap. Its because of the memory allocation.
When it wants to allocate memory it moves up in Stack

22) How to use satellite assemblies? Have you ever thought of using it in your project?

If we want to write multilingual/multicultural app and want to have it spearated from your
main application. Those are called satellite assemblies.
Assemblies which is containing culture information is called satellite assembley.


24) What is publisher subscriber model? Any design pattern can be implemented for it?

It is also called as Observer design pattern.
Windows Communication Foundation (WCF) is the best exampled for this model.
The user can publish a Service and it can be consumed by many clients at the end point.
The Publisher gives the data to the clients who have subscribed to their methods.


I have not answered few questions where it requires more information with examples. Will post that too soon.

Author: naveensanagasetti14 Jun 2013 Member Level: Gold   Points : 0

Hi Baskar,

Greate Job. Nice answers ..

Guest Author: niran21 Nov 2013

Very useful post. Also include the scenario based question with answers.

Guest Author: niran21 Nov 2013

Nice if you can also include the scenario based question and answers.

Guest Author: bhanu pandey04 Jan 2014

very nice post

Author: sarfaraj md18 Jan 2014 Member Level: Silver   Points : 0

Nice This post will help me



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: