Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Hi, I hope you are all fine. If you are a .Net professional and if you are looking for a change in job (especially
in Infosys, IBM, DELL, Aversan) you may want to read: Interview Questions For 3 Year .NET Professionals.
Please read this article in my blog : http://sibeeshpassion.com/dot-net-interview-questions-for-experiencedand-fresher.html
I have described my interview experience there. Now I will share some other important series of questions
that will definitely ask in any .Net interview. What employers currently look for in a candidate is logical
understanding with basic knowledge. So understanding the basics is very important, even if you are an
experienced candidate.
So let us start. I hope you will like this article. Please provide your valuable comments so that I can improve
myself.
First of all you must be ready to introduce yourself. Please don't use so many mmmmm and And and
and. Be confident and don't urge. Take your own time to describe yourself. Look straight. You can find more
tips here: How to Prepare for a Job Interview.
Now we will concentrate on the technical questions.
Please note that these questions are asked in my interview experience, you may need to see more
questions when you go for your interview.
1. What is the sequence of execution of the ASP.NET page life cycle?
The simple way is to remember SILVER.
I (Init)
L (Load)
V (Validate)
E (Event)
R (Render)
Hashtable:
2.
if(ViewState["SampleText"]==null)
3.
4.
5.
ViewState["SampleText"] = str;
}
Hidden Field
View State
Cookies
Control State
Query Strings
Server-side:
Session
1. In Proc mode
2. State Server mode
3. SQL Server mode
4. Custom mode
Application.
Read here.
5. How can we create a new table in SQL with only the structure?
Here is the query to do that.
Select * Into<B>From<A>Where1 = 2
Points to be noted:
1.
2.
myButton.Text = "Hai";
3.
myGrid.Controls.Add(myButton);
Here we are finding the control myButton from the 0th row first cell.
8. What are abstract and interface? Provide actual examples.
Please read here.
9. What is partial class?
There are the following situations of when splitting a class definition is desirable:
2.
3.
To make it more real, let us consider this class is used by the Husband .
4.
5.
6.
7.
8.
9.
10. {
11.
To make it more real, let us consider this class is used by the Wife.
12.
She will add his expenses (in programming life , her codes )
13.
14.
15.
16. }
DECLARE@tabVar TABLE
2.
3.
4.
13. How can you delete a duplicate record from a table in SQL?
There are so many ways to do this. Here I am sharing what I use when I get that kind of situation.
I will create a temp table.
Copy the distinct data from the existing table to the temp table.
Empty the data in the existing table.
Insert the data from the temp table to the source table.
Here is the query to do that:
1. select distinct * into #tempTab From Address_Tab
2. delete from Address_Tab
3. insert into Address_Tab
4. select * from # tempTab
5. drop table # tempTab
14. When to use an override and new in C#?
We can use override when there is virtual/abstract/override type of method in base class.
We can use New when there is no virtual/abstract/override type of method in base class.
Introduction
Last week I attended an interview with Infosys, Chennai. When I entered the compound, there were very
many candidates. The atmosphere and culture in Infosys was very nice.
Please find the original article here : http://sibeeshpassion.com/Infosys-Interview-Questions-For-DotNetProfessionals.html
You can read another series of interview questions here : http://www.csharpcorner.com/UploadFile/65794e/dot-net-interview-questions-for-experienced-and-fresher/
Background
I have attended many interviews in my life. But the interview with Infosys was something different. I
thought to share that experience with you all.
Points to be remember
(There are some mistakes I made in the interview. I don't want you to do the same :) )
1. Please ensure that you are maintaining eye contact with the interviewer.
2. Be confident of what you say. Don't change your answer if the interviewer tries to make you do so.
3. Please avoid the unwanted examples.
4. Please never use any other technical terms that may provoke the interviewer into asking questions
about.
5. If you don't know the answer, please say "I don't know". It is always better to say so instead of going
with the wrong answer.
You can find more tips here: How to Prepare for a Job Interview
Questions asked and answers
(Here I am giving the answers that I answered .)
1. Tell me about yourself?
A. You can find many answers to this question in the internet. Please see the following link:
Tell me about yourself
2. What is your role in your project? What is the team size?
A. I said "My main role is coding, unit testing, big fixing and maintenance. My team size is 7".
3. What is the hierarchy of your team?
A. First I was confused by this question. Then I answered "Project Manager, Team Leader, Software
Engineers, Trainees".
4. Describe the projects that you have worked on?
A. I described them. Please include the technologies you used in your projects and what kind of architecture
(for example: 3-tire, n- tier) you used.
5. What is the employee size in your company? You don't need to be accurate. You can provide the
approximate value.
A. I said "150 to 200".
Then he moved to the programming section.
6. Write an algorithm and program to determine whether or not a word is a palindrome.
We can do it in either of the following two ways:
a) Using a built-in function as in the following:
1.
2.
3.
strReal = Console.ReadLine();
4.
5.
Array.Reverse(tmpChar);
6.
strRev=new string(tmpChar);
7.
if(strReal.Equals(strRev, StringComparison.OrdinalIgnoreCase))
8.
9.
10. }
11. else
12. {
13.
14. }
15.
Console.ReadLine();
3.
try
4.
5.
int min = 0;
6.
7.
while (true)
8.
9.
10.
return true;
11.
12.
13.
if (char.ToLower(minChar) != char.ToLower(maxChar))
14.
15.
return false;
16.
17.
min++;
18.
max--;
19.
20.
21.
catch (Exception)
22.
23.
24.
throw;
25.
26.
using System;
2.
using System.Collections.Generic;
3.
using System.Linq;
4.
using System.Text;
5.
6.
namespace FindCountCharOccurance
7.
8.
class Program
9.
10.
11.
12.
13.
Console.WriteLine("Enter the string in which you need to find the count of a char occurance");
14.
strOccur = Console.ReadLine();
15.
16.
17.
strChar = Console.ReadLine();
18.
19.
20.
Console.ReadLine();
21.
22.
}
}
23. }
Please see this for more suggestions: count the number of characters in a string.
8. Next he gave me a program like the following and asked me what the output of this will be.
1.
public class A
2.
3.
4.
5.
6.
7.
A. I said "Here we have a constructor A; a constructor should not have a return type. So the code above will
throw a compilation error."
9. What may be the output of the following program?
1.
using System;
2.
using System.Collections.Generic;
3.
using System.Linq;
4.
using System.Text;
5.
6.
namespace RefClass
7.
8.
class Program
9.
10.
11.
12.
13.
Console.ReadLine();
14.
15.
16.
17.
public class A
18.
19.
public A()
20.
21.
22.
23.
24.
25.
26.
27.
public B()
28.
29.
30.
31.
32. }
class Program
{
3.
4.
5.
6.
Console.ReadLine();
7.
8.
9.
10.
public class A
11.
12.
public A()
13.
14.
15.
16.
17.
public A(int x)
18.
19.
20.
21.
}
}
22.
23.
24.
25.
public B()
26.
27.
28.
29.
}
}
A. I explained, please read here: Clustered and Non-Clustered Index in SQL 2005
18. What is a Distributed System?
A. A collection of autonomous computers.
http://www.csc.villanova.edu/~schragge/CSC8530/Intro.html
1.
alert('5' + 5 + 5);
2.
alert(5 + 5 + '5');
3.
4.
alert(5 + '5' );
That was little tricky at that time. For a while I thought, and I just wrote the question to a paper, and replied.
1.
alert('5' + 5 + 5);
Output= 555
2.
alert(5 + 5 + '5');
Output=105
3.
4.
alert(5 + '5' );
Question.1
Output=55
Answer: Implementation inheritance is achieved when a class is derived from another class in
such a way that it inherits all its members. Interface inheritance is when a class inherits only the
signatures of the functions from another class.
Question.2 What are generics in C#.NET?
Answer: Generic types to maximize code reuse, type safety, and performance. They can be used
to create collection classes. Generic collection classes in the System.Collections.Generic namespace
should be used instead of classes such as ArrayList in the System.Collections namespace.
Question.3
Answer:
With GetCommandLineArgs() method, the command line arguments can be accessed.
The value returned is an array of strings.
Question.4
Answer: The System.Environment class can be used to retrieve information like command-line
arguments, the exit code, environment variable settings, contents of the call stack, time since last
system boot, the version of the common language runtime.
Question.5
Answer: Exceptions are errors that occur during the runtime of a program. The advantage of using
exceptions is that the program doesnt terminate due to the occurrence of the exception. Whenever an
exception is occurred the .NET runtime throws an object of specified type of Exception. The class
Exception is the base class of all the exceptions..
Question.6
What is a Constructor?
Answer: It is the first method that are called on instantiation of a type. It provides way to set default
values for data before the object is available for use. Performs other necessary functions before the
object is available for use.
Question.8 Can private virtual methods be overridden in C#.NET?
Answer: No, moreover, you cannot access private methods in inherited classes. They have to be
protected in the base class to allow any sort of access.
Question.9 Is is possible to force garbage collector to run?
Answer: Yes, we can force garbage collector to run using System.GC.Collect().
Question.10
What is an Event?
Answer: When an action is performed, this action is noticed by the computer application based on
which the output is displayed. These actions are called events. Examples of events are pressing of the
keys on the keyboard, clicking of the mouse. Likewise, there are a number of events which capture
your actions.
Question.11
What is Delegate?
Answer: Delegates are kind of similar to the function pointers. But they are secure and type-safe. A
delegate instance encapsulates a static or an instance method. Declaring a delegate defines a
reference type which can be used to encapsulate a method having a specific signature.
Question.12
Answer: In Object pooling, you can control the number of connections. In connection pooling, you
can control the maximum number reached. When using connection pooling, if there is nothing in the
pool, a connection is created since the creation is on the same thread. In object pooling, the pool
decides the creation of an object depending on whether the maximum is reached which in case if it is,
the next available object is returned. However, this could increase the time complexity if the object is
heavy.
Question.13 What is Language Integrated Query (LINQ)?
Answer: LINQ is a set of extensions to .NET Framework that encapsulate language integrated
query, set and other transformation operations. It extends VB, C# with their language syntax for
queries. It also provides class libraries which allow a developer to take advantages of these features.
Question.14
contains it?
Explain
the
purpose of CultureInfo
class.
What
namespace
Answer:
System.Globalization namespace contains CultureInfo class. This class provides
information about a specific culture, i.e. datetime format, currency, language etc.
Question.15
Answer: System.Object. Object class is the ultimate base class of all classes in the .NET
Framework, it is the root of the type hierarchy. It is often used as a generic argument in class methods
all classes are treatable as Object classes.
Question.16
between
the
System.Array.CopyTo()
and