Get benefited from interview Q/A and Online Test section. Subscribe to this blog to get updates directly in your mail box.
Best View in Google Crome, Mozilla firefox or IE 7 or above

Sunday, July 24, 2011

Dotnet Interview Questions for 1 year experience

Here are few basic dotnet interview questions asked in interview for a 1 year experience candidate.

About your project:

Get maximum knowledge about your current project. You should know the architecture diagram of your project. Also, you have to explain the Dataflow. You might be asked to tell what all dotnet new features used in your project.

Then follows technical discussion.

Dotnet Framework Interview Questions for 1 Year Experience:

1. What is CLR and it's functions?
2. How memory is managed in Dotnet applications?
Hint: Automatically by Garbage collector
3. What is an assembly?
4. What is a strong name?
5. What is MSIL?

C# Interview Questions for 1 Year Experience:

1. What are the 4 pillars of Object Oriented Programming?
2. What is a Class? What is an Object?
3. What is a partial class?
4. What is a sealed class?
5. What is constructor?
6. What is stringbuilder?

ADO.Net Interview Questions for 1 Year Experience:

1. What is connection string?
2. What is Datareader?
3. Difference between Dataset and datareader?
4. What is Ado.Net?
5. Namespace for using sqlserver database?

ASP.Net Interview Questions for 1 Year Experience:

1. What is web.config file and it's use?
2. What is global.asax?
3. What is session?
4. Which all controls you have used in your project?
5. What is gridview?
6. What is Authentication in ASP.Net and types of authentication?

SQL Server Interview Questions for 1 Year Experience:

1. What is Primary key, unique key and difference between them?
2. What is index? Types of index?
3. What is a stored procedure? Why it is better than inline query?
Hint: Stored Procedure is precompiles and has a execution plan. Hence faster execution.
4. You might be asked to write simple query
5. What is inner join

Also, if you know any advance concepts like WCF, WPF, LINQ, MVC, JQuerymention while telling "about yourself". You will be given preference. But, make sure you know the basics or worked on them for sometime.

Post questions you faced in interview in comments. Also post answers in comments to questions mentioned above.

Monday, July 11, 2011

What is the difference between web.config and machine.config

This is a common question asked in ASP.Net interviews.

Web.config and machine.config are two files used for managing configuration of web applications.


1. The configurations mentioned in machine.config file are applicable to all the applications hosted in a machine/computer/server.

2. The machine.config file is located in x:\\Microsoft.NET\Framework\\config\machine.config

3. There can be only one machine.config file per machine (per dotnet framework installed).


1. web.config file contains configurations for a single application.

2. Web.config files overrides the configurations mentioned in machine.config file.

3. The web configuration file is located in your application's root folder

4. There can be multiple web.config files in a single web application in different sub folders.

Sunday, July 10, 2011

Difference between a temp table and Table Variable in SQL Server

I have faced this question in almost all the interviews. What is the difference between a Temporary table and Table Variable in SQL Server?

Here are the main differences:

1. Declaration syntax:

Temp Table:       CREATE TABLE #tmptbl(ID INT, NAME VARCHAR(20))
Table Variable:   DECLARE @tblvar TABLE(ID INT, NAME VARCHAR(20))

2. Creating Index:

You can create Indexes (Clustered and non-clustered Indexes) in Temp Tables. This can return records faster if there are large number of records in a table.

You cannot create indexes in Table Variables.
Note: You can have Primary key in table variables which will create a clustered index by default. But you cannot create any index explicitly by using Create Index command.

3. Transaction:

The transaction logs are not recorded for the table-variables. Hence, we cannot implement transaction mechanism in case of table variables.
But transaction mechanism is applicable in case of temp tables.

CREATE TABLE #tmptbl (val VARCHAR(50))
DECLARE @tblvar TABLE(val VARCHAR(50))

INSERT INTO #tmptbl VALUES ('Old value in temp table')
INSERT INTO @tblvar VALUES ('Old value in table variable')

#tmptbl SET val='New value in temp table'
UPDATE @tblvar SET val='New value in table variable'

SELECT * FROM #tmptbl
SELECT * FROM @tblvar

SELECT * FROM #tmptbl
SELECT * FROM @tblvar

The output will be as below:

New value in temp table
New value in table variable

Old value in temp table
New value in table variable

Notice that the Update command against the table variable is not getting rolled back.

4. Stored Procedure Recompilation:

A procedure with a temporary table cannot be pre-compiled. But a procedure with table-variables can be compiled in advance. A Pre-compiled Stored Procedure runs faster.

5. Performance:

For small to medium volumes of data and simple usage scenarios you should use table variables. For large set of data, you should go for Temp tables (with proper Indexes).

If you have any more differences, please share in comments.

  © Blogger templates Shiny by 2008

Back to TOP