.Net Interview Quations

Question 1. What technologies you worked for?
Answer. C#, VB, Oracle , SQL Server , ASP.NET, JavaScript
Question 2. Lets start with C#, What is modularization?
Answer. Modularization is dividing functionality into different small modules, so that we can reuse the functionality and make it simple to use.
Question 2. Any other use of modularization and Layered application?
Answer. We can add layer to keep different group of functionalities different. and changing one layer does not effect others.
Question 3. Where does the object and its internal variable int i and string s store, in heap or in stack.
Answer. i think int goes to stack
Question 4. What is garbage collector?
Answer. it used to release the memory. and run in  non deterministic manner.
Question 5. Can we run Garbage collector manually and its recommended?
Answer. Yes we can by gc.collect(), it is not recommended.
Question 6. What is overloading and overriding?
Answer. overriding is having same method in base and drive class and deciding at runtime which one to call.
Question 7. What is difference between the runtime polymorphism and overriding.
Answer. both are same.
Question 2. Difference between string builder and string?
Answer. string builder is mutable and string immutable.
Question 2. can we pass object with ref parameter like fun(ref Obj)?
Question 2.  what is difference between fun(obj) and fun(ref obj)?
Answer. by passing obj we are directly passing object while using ref it passes the address of object.
Question 2. if we have two function abc(int a, int b) and abc(int a, int b, int c) in base class and we derive it in drive class and implement it. in drive class it is overloading or overriding?
Answer. both overloading and overriding.
Question 2. can we have multiple try blocks, can we have multiple catch blocks, can we have multiple finally blocks?
Answer. multiple try yes separate blocks, multiple catch -yes, multiple finally - no
Question 2. What is cluster index and noncluster index ?
Answer. cluster index is physical sorting on table while non cluster index is logical sorting on table.
Question 2. we have a query,
select a, b from table1
where a=a1 and b=b1 and c= c1
on what column will you define the index?
Answer. a, b
Question 2. we have a table empl
emp_id, salary, division
get the employee list whose salary is greater than the average salary of their division?
Question 2. there is two tables
emp_id, salary, division_id - emp table
division_id , div_name - div table
get the maximum salary if every division?
Question 2. What patterns you used in C# code?
Answer. Singleton, facade
Question 2. Write a code to implement a singleton pattern?
Question 2. write a code to check balance brackets in a string? ((()))

Question. Lets start with .NET, What is .NET framework?
Answer. Its a platform to run .NET application, where .net applications can use .net resources.
Question. What is DLL?
Answer. Dynamic link libraries, kind of exe file.
Question. What is manifest?
Answer. Contains Details about assembly. like reference, versions, resources and type.

Question. What types of assemblies are there and what is difference?
Answer. Private and public
private is private to application and kept in local application folder
public assemblies are shared among the applications and kept in GAC.
Question. Suppose there is two versions of a assembly, how your application will decide which version to use?
Answer. In web.config under binding give old version and new version
Q. Any other way to do versioning in GAC?
Answer. Find it out.
Q. What is strong type and loose type ?
Answer. its a language property. The language who provide variable data type declaration called loose type like vb and JavaScript provide var type variable declaration while C# not. so C# is strong type language.


C# interview Questions

Question. What collection type you used?
Answer. ArrayList
Question. What is difference between arraylist and array?
Answer. Array can store single data type and inserting will cost more, while in array list you can store multiple datatypes and inserting and removing element is easy.
Question. What are delegates?
Answer. it is function to pointer.
Question. What are events?
Answer. events are used with delegate to fire a method on any event occurrence?
Question. What is use of delegate?
Answer. Used of delegate to call a function.
Question. any other use of delegate?
Answer. Find out.
Question. What is difference between list and arraylist.
Answer. list is interface while arraylist is implementation.
Question. What is dataset?
Answer. can contains tables and their relations.
Question. What is datareader?
Answer. Read one row at a time , forward only.
Question. How will you fill dropdown values using datareader?
bind every value to dropdown
or construct a dataset from datareader inside loop and assign to dropdown
Question. What is abstraction?
Answer. Representing complex word in simplified manner.
Question. what is OOPs ?
Answer. programming language fully supported by objects
Question. What is Objects?
Answer. by using Objects we can represent real word easily.
Question. what are the features of objects oriented programming?
data hiding
Question. Have you worked on multithreaded application?
Answer. yes
Question. Describe the multithreaded application ?
Answer. Describe a demo multithread application and why using multithreading.
Question. What is Strongly typed dataset?
Answer. Strongly typed dataset is simple dataset containing the property to have datatype associated with columns and can access column values by using the column names.

Question. What is Deep copy and shallow copy?
Answer. Deep copy, copy the whole object and make a different object, it means it do not refer to the original object while in case of shallow copy the target object always refer to the original object and changes in target object also make changes in original object.
Question. how to Create custom collection?
Answer. using System.Collections namespace we can create the our custom collection classes.
Question. how to Bind grid with business obj?
Answer.  return the dataset or datatable from business object and assign to datasource of grid.
Question. What is Singleton and how to implement locking in singleton pattern?
Answer. Singleton pattern usage a class which can contain only one object through out the application.
class my_Singleton
    private static my_Singleton obj;
    protected my_Singleton
    public static my_Singleton Instance()
      if (obj == null)
        obj= new my_Singleton();
      return obj;
Question. What is Typed dataset?
Answer. typed dataset is a normal dataset having property to data type check for Colum values and can access the columns by column names.
Question. What is Using keyword?
Answer. using keyword can be used in two format
1. include the namespace in file
2. handle the idisposable objects inside using block.
iFace obj = new myclass()
Myclass obj1 = new myclass()
is the above code is valid?
Question. What is difference between lock vs static locks?
Answer. static lock is applicable to static methods and variables.
Question. What is suppressfinalize?
Answer. We use this method to not to call the finalize method while disposing the objects.
Question. Can we inherit a class from multiple interfaces?
Answer. yes
Question. suppose two interfaces have same method, so how will you  implement these methods in derive class?
Answer. by using interface name
Question. Lets start with .NET, What is CLR and what is the task perform by CLR?
Answer.  CLR stand for Common language runtime. it have the task like
1. running the garbage collector
2. Code verification
3. code access security
4. executing IL
Question. What is assembly? and what is difference between the .dll and .exe?
Answer.  Assembly is a basic unit of .net program and it contains the all .net code, resources, references and versions etc.
.exe and .dll are same while .exe contains executable code and is machine dependent.
Question. if dll and exe files are same it means you can deploy both the files in GAC?
Answer.  No, deploying a exe file does not mean anything because classes and method are exposed in dll only and exe file is pure executable, any application can not call the function of exe file.
Question. How will you deploy the dll file in GAC?
Answer.  first create the strong name for dll and add this sn name key into the application then use gacutil command to register the dll in GAC.
Question. How will you search for a dll in GAC before registering it?
Answer. use process explorer to check the dlls, if you have any other suggestion, Please comment.
Question. What is difference between IL and DLL ?
Answer. DLL contains the IL and other details (metadata) inside.
Question. is exe is machine dependent?
Answer. yes
Question. How to pass the arguments in thread?
by passing the arguments in start() method.
Answer. thread t1 = new thread(new threadstart(obj.abc));
Question. What changes will you do if you have to pass string instead of int in thread arguments?
Answer. no chnages in thread while we change the method to receive the string or abject variable.
Question. What are the properties of abstract class?
Answer. 1. abstract class can contain the prototype of method and/or implementation of methods.
2. Direct object of abstract class is not possible.
3. we need to inherit a class and make the object of derive class and can access the abstract class methods.
4. abstract classes can contains the abstract functions.
Question. can we have this definition in abstract class?
abstract class abc
abc obj;
Answer. yes, we can have same type of obj we can define in and instantiate to derive class.
Question. What pattern you used?
Singleton and facade
Question. describe the facade pattern and use in you project?
Answer. it is used to access the whole subsystem through a system. i used it in a customer class to access the subsystem like sales, billing, invoice etc.
Question. What is singleton pattern?
Answer. creating only one object of a class.
Question. How will you handle deadlock in singleton pattern?
Answer. use lock or monitor to access by single thread.
Question. What is difference between monitor.enter and monitor.tryenter functions?
Answer. monitor.enter waits for the lock until it does not get it.
while monitor.tryenter will request for lock and it return true if get the lock and return false if does not get it and process further statements.
Question. instead of creating a singleton class, suppose i create a static object of singleton class outside the class and use it though out the application, then what is use of singleton class?
Answer. singleton class is use that accidently programmer do not create the another object of the class. it is used in large systems where we expose class and functions though dlls and want to restrict programmer while using this dll do not creating multiple objects.
Question. Why forcing garbage collector to run is not recommended?
Answer. because it sometimes create performance issue and block other threads.

SemanticSpace Telephonic Interview Questions - .NET

Telephonic interviews are sometimes hard to face. but most of the telephonic interviews are easy and this is just verification process that the person is right candidate for the job or not.
My friend gone through a telephonic round of SemanticSpace for software engineer position for .NET.
Question. They started with project, Tell me something about your current project?
Answer. describe your project.
Question. what is OOPs?
Answer. Object oriented programming, represent every thing in a object.
Question. What is polymorphism? what are different types of polymorphism is there?
Answer. polymorphism means different forms, there are two kind of polymorphism
1. static polymorphism (overloading)
2. dynamic polymorphism (overriding)
Question. What is difference between overloading and overriding?
Answer. having same name methods with different parameters is called overloading, while having same name and parameter functions in base and drive class called overriding.
Question. what is static class and what is use of this?
Answer. Static class we define when we do not want to create a object of class, all methods of static class should be static. static class methods and data are specific to class only and not associated to objects.
Question. Can we have a variables inside the interface?
Answer. no, we can have only methods, properties, indexers and enums inside the interface.
Question. Have you used AJAX?
Answer. I have used AJAX using microsoft ajax toolkit.
Question. What is your role in PL/SQL?
Answer. I used to design and write functions, triggers, procedures and packages.
Question. Have you used Queue in Oracle?
Answer. No
Question. What design patterns you used?
Answer. Facade, Prototype, Singleton. proxy , bridge

Polaris Interview Questions - .NET - Telephonic

One of my friend gone through the Polaris telephonic round for .net for software engineer requirement.
Here is some questions from the same telephonic round.
Question 1. What is assembly?
Answer. Assembly is encoded library of .net applications it contains the all source code references and other resources.
Question 2. What is GAC?
Answer. Global assembly cache, is a special area where we generally keep our global assemblies.
Question 3. what is difference between remoting and webservices?
Answer. remoting is used to communication between applications running on same .net platform while webservice is used to communicate between the applications running on
Question 4. how will you implement security in webservices?
Answer. using SOAP
Question 5. how will you authenticate web service?
Answer. Find it out.
Question 6. what is singleton?
Answer. singleton is a design pattern used to design a software. This design pattern allows you to create only one object of a class.
Question 7. How will you implement remoting in C#?
Answer. Read books.
Question 8. What is SAO and CAO?
Answer. Server activate object and client activated object
Question 9. What is marshaling?
Answer. marshaling is used in remoting to transfer data between application.
Question 10. what is WCF and what is difference between WCF and web services?
Answer. WCF is windows communication foundation same as webservices. actually WCF =webservices + remoting

C# - OOPS Interview Questions

Question 1. What is class and objects?
Answer. Class is collection of functions and variables. and object is used to use this template.
Question 2. Can we declare a constructor to private?
Answer. Yes
Question 3. What is the use of constructor ?
Answer. constructor is used to create and instantiate a object.
Question 4. can we specify the accessibility modifier inside the interface?
Answer.  It should be public there is no use of private methods in interface.
Question 5. how to prevent a public class method to be overridden in drive class?
Answer. just make method to sealed.
Question 6. how to stop a class being inherited by another class?
Answer. just make the class sealed. by using sealed keyword.
Question 7.how to prevent a class being instantiated?
Answer. make class abstract or static
Question 8. How to override a private virtual method?
Answer.you can not override a private method.
Question 9.  can you derive a static method of base class in child class?
Answer. no
Question 10.  can you override a normal public method of base class and make it static?
Answer.no , the method signature  should be same to be overridden.
Question 11. what is early and late binding?
Answer. when we call a non virtual method it decide at compile time and this is called early binding. while if method calling decide at runtime is called late binding.
Question 12. Can namespace contain the private class?
Answer. no, having a single private class does not mean anything , it is applicable only in case of nested class.

MakeMyTrip.com .NET Interview Questions | Written Test | Analytical Test | F2F Interview

This question set contains the written test questions and analytical test and Face to Face interview questions.
This interview was held in may 2010 at MakeMyTrip.com. I don't think they give very good salary but you can negotiate with them.

Written test – Fully objective type .NET

This round was fully objective and contains almost 30 objective type of questions in 20 minutes.
Question 1.  Session objects are accessible in?
1. web forms
2. web Farms
3. both
4. none
Answer.  web forms – check once
Question 2. application objects are accessible in?
1. web forms
2. web Farms
3. both
4. none
Answer.  1. web forms
Question 3.  give me three differences between unique key and primary key?
Answer.  1. Primary key is only one in table while unique key can be multiple
2. unique key can be null
3. cluster index create on primary key while non cluster index can be created on non cluster index.
Question 4. which control have the paging?
1. dataset
2. datareader
3. none
4. all
Answer. find out
Question 5. by default security setting in .net?
Answer. anonymous access
Question 6. which file contains  the configuration settings for URI to access in web services?
Answer. .disco (check it once)
like this there were around 30 questions, most of them asp.net questions were there.

Analytics / Aptitude test

this test was totally analytical and contains 40 questions in 30 minutes. you need to have pen and paper with you while attending the test.
you need to give test on http://www.merittrac.com site.
Question 1.  questions like 5 guys are sitting in a round table now A is sitting left to B , C is sitting next to D and then you have to answer some questions.
Question 2.  A English paragraph was given and you need to answer the some questions by reading those questions.
Question 3. 4 figures was given and you need to find the next figure in sequence.
Question 5. The numeric values of a name was given and you need to find the numeric values for the another name.
Question 6. A numeric expression like 3/23*2+44-2 was given and if + is replaced by *, - is replaced by /, /is replaced by + and * is replaced by – what will be the value. around 6-7 questions of this kind.
Question 7. A conclusion was given and statement 1 and statement 2 was given , you need to choose the options on the basis of these
1. Statement 1 is true
2. statement 2 is true
3. statement 1 and statement 2 is true
4. none

Face to Face Technical Round:

this was third round and face to face.
Question 1. Rate yourself in C#, ASP.net, SQL, JavaScript
C# - 8
SQL - 8
Javascript - 8
Question 2. Lets start with ASP.NET, I have a datagrid/Gridview can i have a dropdown inside a  column and binding to different dataset? How
Answer. Yes, keep dropdown in template column
Question 3. How will you fill a dropdown from another dataset and grid from another dataset.
Answer.  First fill the grid with dataset and then datagrid.columns.findcontrol[“dropdown”] find dropdown and add another dataset to it.
Question 4.  How will you add increasing number (index numbers of rows) in datagrid without bringing it from database.
Answer. one method is to add on rowdatabound. find another
Question 5. Suppose there is two button in a datagrid  column. how will you identify which button is clicked?
Answer. by using commadname and commandargument.
Question 6. what is difference between unique key and primary key?
Answer.  primary key can create cluster index on it. while on unique key we can create non cluster index.
unique key can have null value
primary key is only one in table while unique key can be many.
Question 7. how many nulls unique key can have?
Answer. only one
Question 8. can we define unique key on combination of keys?
Answer. yes

Max Bupa .NET - C# - Oracle Interview Questions Round 1

One of my friend gone through the max bupa technical interview for .net requirement for software engineer post.
here is some questions from the same interview.
Question. Tell me something about you ?
Question. rate your self in C# and oracle ?
Answer. C# –8 Oracle - 8
Question. Define a constant at package level in oracle

Answer.  temp constant number := 12;
Question. how will you access this?
Answer. by using the variable name.
Question. will this constant have same values for same transaction?
Answer. yes
Question. How will you implement transaction in C# ?
Answer. begin trans, end trans
Question. Suppose you have these lines of code:
oracle statement 1


oracle statement 2


oraclestatement 3

comittrans; // error

end trans

rollback trans

now in rollbacktrans which whole transaction will rollback or just last committed trans. ?
Answer.  the transaction will rollback till oracle statement 2

Question. what is cluster index, what is not cluster index ?
Answer. cluster index created on primary key while non cluster index is created on non primary key and it is logical index.
Question. how will you define the cluster index ?
Answer. create clusterindex on table(column1, column2)
Question. when you create a table with primary key a cluster index already created. so what is use of this command?
Answer. suppose while defining table there is no primary key in that case we can use this command.
Question. how to define function in oracle and call ?
Answer.  check it by your self.
Question. what is difference between function and procedure?

1. function returns one value while procedure can return multiple.

2. function can be used with select statement while procedure can not.

3. there is some operation we can not do with functions

Question. suppose a table student have following details
id marks1 marks2
write a query to display id and grade of student as follows

1. when sum of marks1 and marks2 is greater than 60 display grade A

2. when sum of marks1 and marks2 is less than 60 and greater than 40 display grade B

3. when sum of marks1 and marks2 is less than 40 display grade C
select case when marks1 + marks2 > 60 then
when marks1 + marks2 > 40 then
from student ;

Question. What are the event datagird supports and how will you access the values of cell.
Answer. Check msdn.
Question. How to change the color of rows in datagrid?
Answer. use initialise row event
Question. how define a connection and open in oracle ?
Answer. check msdn.
Question. how to use pooling

Answer define pooling=true  in connection string
Question. how do you know that connection is already open and it have to pick from pool?
Answer. system detect automatically.
Question. write how to pass the parameters in oracle procedure.
oda.SelectCommand = ocmd; 
oda.SelectCommand.Parameters.Add("my_column",   Oracle.DataAccess.Client.OracleDbType.Int32,15).Value=2;

RBS Selection Process - Technical Interview

One of my friend gone through the RBS selection process. He qualified  all the rounds and Joined the RBS Gurgaon.
Let me guide you step by step selection process of RBS. Please note that this process can differ at different centers and also for different positions.
These rounds were taken for the Software Developer/Designer and the technology was C# and SQL Server.
Round 1: RBS Online Test Round
This first round of RBS Selection process and you need to give this round at any nearby reliance  center or RBS Center.
This will be around 2 hour test of C# and SQL Server. Total number of questions will be around 56. These questions will contains multiple choice questions and maximum 3 options can be true.
This is IKM test and every question have different marks.
Round 2: RBS Telephonic Interview Round
This is second round of RBS Selection process and In this interview they can ask basic questions of C# and SQL server like:
What is satellite assembly
how will you create strong name
They can give any problem and ask for solution in C#
Round 3: RBS Written test
This round can have some problems and you need to write a algorithms/Diagram codes / C# codes for these problems.
Round 4: RBS Technical Interview
This round is pure technical round and they can ask design patterns , implementations , real time problems solving of C# and SQL Server like
design a chess program using design pattern
Same kind of multiple rounds can be there until they are not satisfied with you.
So get ready for a challenging interview and clear your concepts.
Best of luck.

C# Written Test Questions 2010

One of my friend gone through the written test of a small company in Gurgaon. I decided to post some of questions from the test, so that the fresher's as well as experience holder get benefits. These are common questions and one need to know when going for interview.
This written test was for senior software engineer purely contains .net and C# questions.
Question 1: What is OOPs?
Answer: Object oriented programming like C#.
Question 2: What is XPath?
Answer: XPath is used to navigate through the elements and attributed in XML document.
Question 3: What is Strong type and Week type?
Answer: week type language support the any type variable declaration like java script supports var (no specific data type). Strong type language do not support var like C#.
Question 4: What is polymorphism?
Answer: Polymorphism means different forms, two types of polymorphism
1. runtime polymorphism
2. static polymorphism
Question 5: Difference between interface and abstract class?
Answer: Interface can have only function prototype and all functions should be implemented in inherited class. while abstract class can have function implementation.
Question 6: What is WCF, WPF, WWF? 
Answer: WCF: windows communication foundation
WPF: Windows presentation foundation
WWF: Windows workflow foundation
Question 7: What is Address, Contract and binding?
Answer: Address: An address that indicates where the endpoint can be found.
Contract: A contract that identifies the operations available.
Binding: A binding that specifies how a client can communicate with the endpoint.
Question 8: What is root class of .NET?
Answer: System.Object
Question 9: What is multicast delegate?
Answer: Multicast delegate is a delegate which allow to execute more than one method in single event.
Question 10: Can web services supports method overloading Explain with and example?
Answer: Yes, its same as simple method overloading just add a [web method] before the methods.
Question 11: What is difference between web services and WCF?
Answer: WCF = Web services + .NET Remoting
Question 12: Difference between View State and Session state?
Answer: View State is a client side storage management and store data while page postback. Session state is server side management and keep user specific data for session.
Question 13: What is machine.config?
Answer:  machine.config file apply settings to all applications running on the same machine.


Post a Comment