SlideShare a Scribd company logo
1 of 16
Download to read offline
.NET Interview Questions by Vineet Kumar Saini

Q1 - Write a query to find the total number of rows in a table

A1 - Select count(*) from t_employee;

Q2 - Write a query to eliminate duplicate records in the results of a table

A2 - Select distinct * from t_employee;

Q3 - Write a query to insert a record into a table

A3 - Insert into t_employee values ('empid35','Barack','Obama');

Q4 - Write a query to delete a record from a table

A4 - delete from t_employee where id='empid35';

Q5 - Write a query to display a row using index

A5 - For this, the indexed column of the table needs to be set as a parameter in the
where clause

select * from t_employee where id='43';

Q6 - Write a query to fetch the highest record in a table, based on a record,
say salary field in the t_salary table

A6 - Select max(salary) from t_salary;

Q7 - Write a query to fetch the first 3 characters of the field designation from
the table t_employee

A7 - Select substr(designation,1,3) from t_employee; -- Note here that the substr
function has been used.

Q8 - Write a query to concatenate two fields, say Designation and Department
belonging to a table t_employee

Select Designation + ‘ ‘ + Department from t_employee;

Q9 -What is the difference between UNION and UNION ALL in SQL?




            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

A9 - UNION is an SQL keyword used to merge the results of two or more tables
using a Select statement, containing the same fields, with removed duplicate
values. UNION ALL does the same, however it persists duplicate values.

Q10 - If there are 4 SQL Select statements joined using Union and Union All,
how many times should a Union be used to remove duplicate rows?

A10 - One time.

Q11 - What is the difference between IN and BETWEEN, that are used inside
a WHERE clause?

A11 - The BETWEEN clause is used to fetch a range of values, whereas the IN
clause fetches data from a list of specified values.

Q12 - Explain the use of the ‘LIKE’ keyword used in the WHERE
clause? Explain wildcard characters in SQL.

A12 - LIKE is used for partial string matches. The symbol ‘%’ ( for a string of any
character ) and ‘_’ (for any single character ) are the two wild card characters used
in SQL.

Q13 - What is the need to use a LIKE statement?

A13 - When a partial search is required in a scencario, where for instance, you
need to find all employees with the last name having the sequence of characters
"gat", then you may use the following query, to match a search criteria:

Select empid, firstname, lastname from t_employee where lastname like ‘%gats%’

This might search all employees with last name containing the character sequence
'gats' like Gates, Gatsby, Gatsburg, Sogatsky, etc.

% is used to represent remaining all characters in the name. This query fetches all
records contains gats in the e middle of the string.

Q14 - Explain the use of the by GROUP BY and the HAVING clause.

A14 - The GROUP BY partitions the selected rows on the distinct values of the
column on which the group by has been done. In tandem, the HAVING selects
groups which match the criteria specified.


            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Q15 - In a table t_employee, the department column is nullable. Write a query
to fetch employees which are not assigned a department yet.

A11. Select empid, firstname, lastname from t_employee where department is
null;

Q16 -What are the large objects supported by oracle and db2? What are the
large objects supported in MS SQL?

A16 - In Oracle and DB2 BLOB , CLOB ( Binary Large Objects, Character Large
Objects) are used.

In MS SQL - the data types are image and varbinary.

Q17 - Whats the capacity of the image data type in MS SQL?

A17 - Variable-length binary data with a maximum length of 2^31 - 1
(2,147,483,647) bytes.

Q18 - Whats the capacity of varbinary data type in MS SQL?

A18 - Variable-length binary data with a maximum length of 8,000 bytes.

Q19 - What’s the difference between a primary key and a unique key?

A19 - Both Primary key and Unique key enforce the uniqueness of a column on
which they are defined. However, a Primary key does not allow nulls, whereas
unique key allow nulls.

Q20 - What are the different types of joins in SQL?

INNER JOIN
OUTER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
INNER JOIN

Read here for more http://www.dotnetuncle.com/SQL/What-is-Join-in-SQL-types-
of-joins.aspx

Q21 - What is a Self join?

           MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

A21 - A join created by joining two or more instances of a same table.
Query: Select A.firstname ,B.firstname
from t_employee A, t_employee B
where A.supervisor_id = B.employee_id;

Q22 - What is a transaction and ACID?

A22 - Transaction - A transaction is a logical unit of work. All steps must be
committed or rolled back.
ACID - Atomicity, Consistency, Isolation and Durability, these are the unique
entities of a transaction.

===========================================================
=========




Short Answer .NET Interview Questions (PAGE 1)

Q1. Explain the differences between Server-side and Client-side code?
Ans. Server side code will execute at server (where the website is hosted) end, &
all the business logic will execute at server end where asclient side code will
execute at client side (usually written in javascript, vbscript, jscript) at browser
end.

Q2. What type of code (server or client) is found in a Code-Behind class?
Ans. Server side code.

Q3. How to make sure that value is entered in an asp:Textbox control?
Ans. Use a RequiredFieldValidator control.

Q4. Which property of a validation control is used to associate it with a server
control on that page?
Ans. ControlToValidate property.

Q5. How would you implement inheritance using VB.NET & C#?
Ans. C# Derived Class : Baseclass

            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

VB.NEt : Derived Class Inherits Baseclass

Q6. Which method is invoked on the DataAdapter control to load the
generated dataset with data?
Ans. Fill() method.

Q7. What method is used to explicitly kill a user's session?
Ans. Session.Abandon()

Q8. What property within the asp:gridview control is changed to bind
columns manually?
Ans. Autogenerated columns is set to false

Q9. Which method is used to redirect the user to another page without
performing a round trip to the client?
Ans. Server.Transfer method.

Q10. How do we use different versions of private assemblies in same
application without re-build?
Ans.Inside the Assemblyinfo.cs or Assemblyinfo.vb file, we need to specify
assembly version.
assembly: AssemblyVersion

Q11. Is it possible to debug java-script in .NET IDE? If yes, how?
Ans. Yes, simply write "debugger" statement at the point where the breakpoint
needs to be set within the javascript code and also enable javascript debugging in
the browser property settings.

Q12. How many ways can we maintain the state of a page?
Ans. 1. Client Side - Query string, hidden variables, viewstate, cookies
2. Server side - application , cache, context, session, database

Q13. What is the use of a multicast delegate?
Ans. A multicast delegate may be used to call more than one method.

Q14. What is the use of a private constructor?
Ans. A private constructor may be used to prevent the creation of an instance for a
class.

Q15. What is the use of Singleton pattern?

            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Ans. A Singleton pattern .is used to make sure that only one instance of a class
exists.

Q16. When do we use a DOM parser and when do we use a SAX parser?
Ans. The DOM Approach is useful for small documents in which the program
needs to process a large portion of the document whereas the SAX approach is
useful for large documents in which the program only needs to process a small
portion of the document.

Q17. Will the finally block be executed if an exception has not occurred?
Ans.Yes it will execute.

Q18. What is a Dataset?
Ans. A dataset is an in memory database kindof object that can hold database
information in a disconnected environment.

Q19. Is XML a case-sensitive markup language?
Ans. Yes.

Q20. What is an .ashx file?
Ans. It is a web handler file that produces output to be consumed by an xml
consumer client (rather than a browser).

Q21. What is encapsulation?
Ans. Encapsulation is the OOPs concept of binding the attributes and behaviors in
a class, hiding the implementation of the class and exposing the functionality.

Q22. What is Overloading?
Ans. When we add a new method with the same name in a same/derived class but
with different number/types of parameters, the concept is called overluoad and this
ultimately implements Polymorphism.

Q23. What is Overriding?
Ans.When we need to provide different implementation in a child class than the
one provided by base class, we define the same method with same signatures in the
child class and this is called overriding.

Q24. What is a Delegate?

            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Ans. A delegate is a strongly typed function pointer object that encapsulates a
reference to a method, and so the function that needs to be invoked may be called
at runtime.

Q25. Is String a Reference Type or Value Type in .NET?
Ans. String is a Reference Type object.

Q26. What is a Satellite Assembly?
Ans. Satellite assemblies contain resource files corresponding to a locale (Culture
+ Language) and these assemblies are used in deploying an application globally for
different languages.

Q27. What are the different types of assemblies and what is their use?
Ans. Private, Public(also called shared) and Satellite Assemblies.

Q28. Are MSIL and CIL the same thing?
Ans. Yes, CIL is the new name for MSIL.

Q29. What is the base class of all web forms?
Ans. System.Web.UI.Page

Q30. How to add a client side event to a server control?
Ans. Example...
BtnSubmit.Attributes.Add("onclick","javascript:fnSomeFunctionInJavascript()");

Q31. How to register a client side script from code-behind?
Ans. Use the Page.RegisterClientScriptBlock method in the server side code to
register the script that may be built using a StringBuilder.

Q32. Can a single .NET DLL contain multiple classes?
Ans. Yes, a single .NET DLL may contain any number of classes within it.

Q33. What is DLL Hell?
Ans. DLL Hell is the name given to the problem of old unmanaged DLL's due to
which there was a possibility of version conflict among the DLLs.

            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini


Q34. can we put a break statement in a finally block?
Ans. The finally block cannot have the break, continue, return and goto statements.

Q35. What is a CompositeControl in .NET?
Ans. CompositeControl is an abstract class in .NET that is inherited by those web
controls that contain child controls within them.

Q36. Which control in asp.net is used to display data from an xml file and
then displayed using XSLT?
Ans. Use the asp:Xml control and set its DocumentSource property for associating
an xml file, and set its TransformSource property to set the xml control's xsl file
for the XSLT transformation.

Q37. Can we run ASP.NET 1.1 application and ASP.NET 2.0 application on
the same computer?
Ans. Yes, though changes in the IIS in the properties for the site have to be made
during deployment of each.

Q38. What are the new features in .NET 2.0?
Ans. Plenty of new controls, Generics, anonymous methods, partial classes,
iterators, property visibility (separate visibility for get and set) and static classes.

Q39. Can we pop a MessageBox in a web application?
Ans. Yes, though this is done clientside using an alert, prompt or confirm or by
opening a new web page that looks like a messagebox.

Q40. What is managed data?
Ans. The data for which the memory management is taken care by .Net runtime’s
garbage collector, and this includes tasks for allocation de-allocation.

Q41. How to instruct the garbage collector to collect unreferenced data?
Ans. We may call the garbage collector to collect unreferenced data by executing
the System.GC.Collect() method.



             MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Q42. How can we set the Focus on a control in ASP.NET?
Ans. txtBox123.Focus(); OR Page.SetFocus(NameOfControl);

Q43. What are Partial Classes in Asp.Net 2.0?
Ans. In .NET 2.0, a class definition may be split into multiple physical files but
partial classes do not make any difference to the compiler as during compile time,
the compiler groups all the partial classes and treats them as a single class.

Q44. How to set the default button on a Web Form?
Ans. <asp:form id="form1" runat="server" defaultbutton="btnGo"/>

Q45.Can we force the garbage collector to run?
Ans. Yes, using the System.GC.Collect(), the garbage collector is forced to run in
case required to do so.

Q46. What is Boxing and Unboxing?
Ans. Boxing is the process where any value type can be implicitly converted to a
reference type object while Unboxing is the opposite of boxing process where the
reference type is converted to a value type.

Q47. What is Code Access security? What is CAS in .NET?
Ans. CAS is the feature of the .NET security model that determines whether an
application or a piece of code is permitted to run and decide the resources it can
use while running.

Q48. What is Multi-tasking?
Ans. It is a feature of operating systems through which multiple programs may run
on the operating system at the same time, just like a scenario where a Notepad, a
Calculator and the Control Panel are open at the same time.

Q49. What is Multi-threading?
Ans. When an application performs different tasks at the same time, the application
is said to exhibit multithreading as several threads of a process are running.2

Q50. What is a Thread?

            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Ans. A thread is an activity started by a process and its the basic unit to which an
operating system allocates processor resources.

Q51. What does AddressOf in VB.NET operator do?
Ans. The AddressOf operator is used in VB.NET to create a delegate object to a
method in order to point to it.

Q52. How to refer to the current thread of a method in .NET?
Ans. In order to refer to the current thread in .NET, the Thread.CurrentThread
method can be used. It is a public static property.

Q53. How to pause the execution of a thread in .NET?
Ans. The thread execution can be paused by invoking the
Thread.Sleep(IntegerValue) method where IntegerValue is an integer that
determines the milliseconds time frame for which the thread in context has to
sleep.

Q54. How can we force a thread to sleep for an infinite period?
Ans. Call the Thread.Interupt() method.

Q55. What is Suspend and Resume in .NET Threading?
Ans. Just like a song may be paused and played using a music player, a thread may
be paused using Thread.Suspend method and may be started again using the
Thread.Resume method. Note that sleep method immediately forces the thread to
sleep whereas the suspend method waits for the thread to be in a persistable
position before pausing its activity.

Q56. How can we prevent a deadlock in .Net threading?
Ans. Using methods like Monitoring, Interlocked classes, Wait handles, Event
raising from between threads, using the ThreadState property.

Q57. What is Ajax?
Ans. AsyncronousJavascript and XML - Ajax is a combination of client side
technologies that sets up asynchronous communication between the user interface
and the web server so that partial page rendering occur instead of complete page

            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

postbacks.

Q58. What is XmlHttpRequest in Ajax?
Ans. It is an object in Javascript that allows the browser to communicate to a web
server asynchronously without making a postback.

Q59. What are the different modes of storing an ASP.NET session?
Ans. InProc (the session state is stored in the memory space of the Aspnet_wp.exe
process but the session information is lost when IIS reboots), StateServer (the
Session state is serialized and stored in a separate process call Viewstate is an
object in .NET that automatically persists control setting values across the multiple
requests for the same page and it is internally maintained as a hidden field on the
web page though its hashed for security reasons.

Q60. What is a delegate in .NET?
Ans. A delegate in .NET is a class that can have a reference to a method, and this
class has a signature that can refer only those methods that have a signature which
complies with the class.

Q61. Is a delegate a type-safe functions pointer?
Ans. Yes

Q62. What is the return type of an event in .NET?
Ans. There is No return type of an event in .NET.

Q63. Is it possible to specify an access specifier to an event in .NET?
Ans. Yes, though they are public by default.

Q64. Is it possible to create a shared event in .NET?
Ans. Yes, but shared events may only be raised by shared methods.

Q65. How to prevent overriding of a class in .NET?
Ans. Use the keyword NotOverridable in VB.NET and sealed in C#.

Q66. How to prevent inheritance of a class in .NET?


             MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Ans. Use the keyword NotInheritable in VB.NET and sealed in C#.

Q67. What is the purpose of the MustInherit keyword in VB.NET?
Ans. MustInherit keyword in VB.NET is used to create an abstract class.

Q68. What is the access modifier of a member function of in an Interface
created in .NET?
Ans. It is always public, we cant use any other modifier other than the public
modifier for the member functions of an Interface.

Q69. What does the virtual keyword in C# mean?
Ans. The virtual keyword signifies that the method and property may be
overridden.

Q70. How to create a new unique ID for a control?
Ans. ControlName.ID = "ControlName" + Guid.NewGuid().ToString(); //Make
use of the Guid class

Q71A. What is a HashTable in .NET?
Ans. A Hashtable is an object that implements the IDictionary interface, and can be
used to store key value pairs. The key may be used as the index to access the
values for that index.

Q71B. What is an ArrayList in .NET?
Ans. Arraylist object is used to store a list of values in the form of a list, such that
the size of the arraylist can be increased and decreased dynamically, and moreover,
it may hold items of different types. Items in an arraylist may be accessed using an
index.

Q72. What is the value of the first item in an Enum? 0 or 1?
Ans. 0

Q73. Can we achieve operator overloading in VB.NET?
Ans. Yes, it is supported in the .NET 2.0 version, the "operator" keyword is used.



            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Q74. What is the use of Finalize method in .NET?
Ans. .NET Garbage collector performs all the clean up activity of the managed
objects, and so the finalize method is usually used to free up the unmanaged
objects like File objects, Windows API objects, Database connection objects, COM
objects etc.

Q75. How do you save all the data in a dataset in .NET?
Ans. Use the AcceptChanges method which commits all the changes made to the
dataset since last time Acceptchanges was performed.

Q76. Is there a way to suppress the finalize process inside the garbage
collector forcibly in .NET?
Ans. Use the GC.SuppressFinalize() method.

Q77. What is the use of the dispose() method in .NET?
Ans. The Dispose method in .NET belongs to IDisposable interface and it is best
used to release unmanaged objects like File objects, Windows API objects,
Database connection objects, COM objects etc from the memory. Its performance
is better than the finalize() method.

Q78. Is it possible to have have different access modifiers on the get and set
methods of a property in .NET?
Ans. No we can not have different modifiers of a common property, which means
that if the access modifier of a property's get method is protected, and it must be
protected for the set method as well.

Q79. In .NET, is it possible for two catch blocks to be executed in one go?
Ans. This is NOT possible because once the correct catch block is executed then
the code flow goes to the finally block.

Q80. Is there any difference between System.String and System.StringBuilder
classes?
Ans. System.String is immutable by nature whereas System.StringBuilder can have
a mutable string in which plenty of processes may be performed.



            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Q81. What technique is used to figure out that the page request is a postback?
Ans. The IsPostBack property of the page object may be used to check whether the
page request is a postback or not. IsPostBack property is of the type Boolean.

Q82. Which event of the ASP.NET page life cycle completely loads all the
controls on the web page?
Ans. The Page_load event of the ASP.NET page life cycle assures that all controls
are completely loaded. Even though the controls are also accessible in Page_Init
event but here, the viewstate is incomplete.

Q83. How is ViewState information persisted across postbacks in an
ASP.NET webpage?
Ans. Using HTML Hidden Fields, ASP.NET creates a hidden field with an
ID="__VIEWSTATE" and the value of the page's viewstate is encoded (hashed)
for security.

Q84. What is the ValidationSummary control in ASP.NET used for?
Ans. The ValidationSummary control in ASP.NET displays summary of all the
current validation errors.

Q85. What is AutoPostBack feature in ASP.NET?
Ans. In case it is required for a server side control to postback when any of its
event is triggered, then the AutoPostBack property of this control is set to true.

Q86. What is the difference between Web.config and Machine.Config in
.NET?
Ans. Web.config file is used to make the settings to a web application, whereas
Machine.config file is used to make settings to all ASP.NET applications on a
server(the server machine).

Q87. What is the difference between a session object and an application
object?
Ans. A session object can persist information between HTTP requests for a
particular user, whereas an application object can be used globally for all the users.



            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Q88. Which control has a faster performance, Repeater or Datalist?
Ans. Repeater.

Q89. Which control has a faster performance, Datagrid or Datalist?
Ans. Datalist.

Q90. How to we add customized columns in a Gridview in ASP.NET?
Ans. Make use of the TemplateField column.

Q91. Is it possible to stop the clientside validation of an entire page?
Ans. Set Page.Validate = false;

Q92. Is it possible to disable client side script in validators?
Ans. Yes. simplyEnableClientScript = false.

Q93. How do we enable tracing in .NET applications?
Ans. <%@ Page Trace="true" %>

Q94. How to kill a user session in ASP.NET?
Ans. Use the Session.abandon() method.

Q95. Is it possible to perform forms authentication with cookies disabled on a
browser?
Ans. Yes, it is possible.

Q96. What are the steps to use a checkbox in a gridview?
Ans. <ItemTemplate>
<asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="True"
OnCheckedChanged="Check_Clicked"></asp:CheckBox>
</ItemTemplate>

Q97. What are design patterns in .NET?
Ans. A Design pattern is a repeatitive solution to a repeatitive problem in the
design of a software architecture.



            MCN Solutions Pvt. Ltd. Noida
.NET Interview Questions by Vineet Kumar Saini

Q98. What is difference between dataset and datareader in ADO.NET?
Ans. A DataReader provides a forward-only and read-only access to data, while
the DataSet object can carry more than one table and at the same time hold the
relationships between the tables. Also note that a DataReader is used in a
connected architecture whereas a Dataset is used in a disconnected architecture.

Q99. Can connection strings be stored in web.config?
Ans. Yes, in fact this is the best place to store the connection string information.

Q100. Whats the difference between web.config and app.config?
Ans. Web.config is used for web based asp.net applications whereas app.config is
used for windows based applications.




            MCN Solutions Pvt. Ltd. Noida

More Related Content

What's hot

Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In SqlAnurag
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query OptimizationBrian Gallagher
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answersiimjobs and hirist
 
C# Interview Questions | Edureka
C# Interview Questions | EdurekaC# Interview Questions | Edureka
C# Interview Questions | EdurekaEdureka!
 
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningOracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningeVideoTuition
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And AnswerJagan Mohan Bishoyi
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentCan Elmas
 
SQLite3
SQLite3SQLite3
SQLite3cltru
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentationivpol
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands1keydata
 

What's hot (20)

Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In Sql
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
Good sql server interview_questions
Good sql server interview_questionsGood sql server interview_questions
Good sql server interview_questions
 
MySQL Transactions
MySQL TransactionsMySQL Transactions
MySQL Transactions
 
Introduction to C# Programming
Introduction to C# ProgrammingIntroduction to C# Programming
Introduction to C# Programming
 
C# classes objects
C#  classes objectsC#  classes objects
C# classes objects
 
Web api
Web apiWeb api
Web api
 
Mysql
MysqlMysql
Mysql
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
C# Interview Questions | Edureka
C# Interview Questions | EdurekaC# Interview Questions | Edureka
C# Interview Questions | Edureka
 
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningOracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And Answer
 
Nested Queries-SQL.ppt
Nested Queries-SQL.pptNested Queries-SQL.ppt
Nested Queries-SQL.ppt
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
SQLite3
SQLite3SQLite3
SQLite3
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
MERN stack roadmap
MERN stack roadmapMERN stack roadmap
MERN stack roadmap
 

Viewers also liked

ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra ChauhanASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra ChauhanShailendra Chauhan
 
State Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVCState Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVCjinaldesailive
 
Common hr interview questions and answers
Common hr interview questions and answersCommon hr interview questions and answers
Common hr interview questions and answersMasum Mia
 
VMware Interview questions and answers
VMware Interview questions and answersVMware Interview questions and answers
VMware Interview questions and answersvivaankumar
 
PHP Technical Questions
PHP Technical QuestionsPHP Technical Questions
PHP Technical QuestionsPankaj Jha
 
10 tips to answer question: tell me about your self
10 tips to answer question: tell me about your self10 tips to answer question: tell me about your self
10 tips to answer question: tell me about your selfjobguide247
 
50 common interview questions and answers
50 common interview questions and answers50 common interview questions and answers
50 common interview questions and answersKumar
 
Software and Tear
Software and TearSoftware and Tear
Software and TearJosh Howell
 
ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1Umar Ali
 
Inversion of control using dependency injection in Web APIs using Unity Conta...
Inversion of control using dependency injection in Web APIs using Unity Conta...Inversion of control using dependency injection in Web APIs using Unity Conta...
Inversion of control using dependency injection in Web APIs using Unity Conta...Akhil Mittal
 
Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...Akhil Mittal
 
Technical Video Training Sites- 1
Technical Video Training Sites- 1Technical Video Training Sites- 1
Technical Video Training Sites- 1Umar Ali
 
Dot net interview questions
Dot net interview questionsDot net interview questions
Dot net interview questionsNetra Wable
 

Viewers also liked (20)

C# simplified
C#  simplifiedC#  simplified
C# simplified
 
ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra ChauhanASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
 
State Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVCState Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVC
 
Common hr interview questions and answers
Common hr interview questions and answersCommon hr interview questions and answers
Common hr interview questions and answers
 
VMware Interview questions and answers
VMware Interview questions and answersVMware Interview questions and answers
VMware Interview questions and answers
 
Practice exam php
Practice exam phpPractice exam php
Practice exam php
 
PHP Technical Questions
PHP Technical QuestionsPHP Technical Questions
PHP Technical Questions
 
10 tips to answer question: tell me about your self
10 tips to answer question: tell me about your self10 tips to answer question: tell me about your self
10 tips to answer question: tell me about your self
 
50 common interview questions and answers
50 common interview questions and answers50 common interview questions and answers
50 common interview questions and answers
 
Asp net-mvc-3 tier
Asp net-mvc-3 tierAsp net-mvc-3 tier
Asp net-mvc-3 tier
 
Software and Tear
Software and TearSoftware and Tear
Software and Tear
 
ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1
 
Inversion of control using dependency injection in Web APIs using Unity Conta...
Inversion of control using dependency injection in Web APIs using Unity Conta...Inversion of control using dependency injection in Web APIs using Unity Conta...
Inversion of control using dependency injection in Web APIs using Unity Conta...
 
PDFArticle
PDFArticlePDFArticle
PDFArticle
 
Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...
 
Asp.net MVC DI
Asp.net MVC DIAsp.net MVC DI
Asp.net MVC DI
 
Technical Video Training Sites- 1
Technical Video Training Sites- 1Technical Video Training Sites- 1
Technical Video Training Sites- 1
 
Angularjs Basics
Angularjs BasicsAngularjs Basics
Angularjs Basics
 
Interview questions on asp
Interview questions on aspInterview questions on asp
Interview questions on asp
 
Dot net interview questions
Dot net interview questionsDot net interview questions
Dot net interview questions
 

Similar to Top 100 .Net Interview Questions and Answer

Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersSatyam Jaiswal
 
Latest .Net Questions and Answers
Latest .Net Questions and Answers Latest .Net Questions and Answers
Latest .Net Questions and Answers Narasimhulu Palle
 
Top 50 Accenture Interview Questions and Answers
Top 50 Accenture Interview Questions and AnswersTop 50 Accenture Interview Questions and Answers
Top 50 Accenture Interview Questions and AnswersSimplilearn
 
Sql interview question part 3
Sql interview question part 3Sql interview question part 3
Sql interview question part 3kaashiv1
 
Salesforce integration questions
Salesforce integration questionsSalesforce integration questions
Salesforce integration questionsDebabrat Rout
 
Sql interview question part 7
Sql interview question part 7Sql interview question part 7
Sql interview question part 7kaashiv1
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12kaashiv1
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12kaashiv1
 
Abstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdfAbstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdfkarymadelaneyrenne19
 
14 22 size sql book(1)
14 22 size sql book(1)14 22 size sql book(1)
14 22 size sql book(1)bhganesh
 
Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwerskavinilavuG
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questionsAniketBhandare2
 

Similar to Top 100 .Net Interview Questions and Answer (20)

C# interview
C# interviewC# interview
C# interview
 
Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & Answers
 
Latest .Net Questions and Answers
Latest .Net Questions and Answers Latest .Net Questions and Answers
Latest .Net Questions and Answers
 
Top 50 Accenture Interview Questions and Answers
Top 50 Accenture Interview Questions and AnswersTop 50 Accenture Interview Questions and Answers
Top 50 Accenture Interview Questions and Answers
 
Ebook3
Ebook3Ebook3
Ebook3
 
Sql interview question part 3
Sql interview question part 3Sql interview question part 3
Sql interview question part 3
 
Database testing
Database testingDatabase testing
Database testing
 
Salesforce integration questions
Salesforce integration questionsSalesforce integration questions
Salesforce integration questions
 
Ebook7
Ebook7Ebook7
Ebook7
 
Sql interview question part 7
Sql interview question part 7Sql interview question part 7
Sql interview question part 7
 
C#
C#C#
C#
 
Java performance
Java performanceJava performance
Java performance
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
Ebook12
Ebook12Ebook12
Ebook12
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
Abstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdfAbstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdf
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
14 22 size sql book(1)
14 22 size sql book(1)14 22 size sql book(1)
14 22 size sql book(1)
 
Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwers
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questions
 

More from Vineet Kumar Saini (20)

Abstract Class and Interface in PHP
Abstract Class and Interface in PHPAbstract Class and Interface in PHP
Abstract Class and Interface in PHP
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
 
Pagination in PHP
Pagination in PHPPagination in PHP
Pagination in PHP
 
Stripe in php
Stripe in phpStripe in php
Stripe in php
 
Php Tutorials for Beginners
Php Tutorials for BeginnersPhp Tutorials for Beginners
Php Tutorials for Beginners
 
Install Drupal on Wamp Server
Install Drupal on Wamp ServerInstall Drupal on Wamp Server
Install Drupal on Wamp Server
 
Joomla 2.5 Tutorial For Beginner PDF
Joomla 2.5 Tutorial For Beginner PDFJoomla 2.5 Tutorial For Beginner PDF
Joomla 2.5 Tutorial For Beginner PDF
 
Functions in PHP
Functions in PHPFunctions in PHP
Functions in PHP
 
Sorting arrays in PHP
Sorting arrays in PHPSorting arrays in PHP
Sorting arrays in PHP
 
Dropdown List in PHP
Dropdown List in PHPDropdown List in PHP
Dropdown List in PHP
 
Update statement in PHP
Update statement in PHPUpdate statement in PHP
Update statement in PHP
 
Delete statement in PHP
Delete statement in PHPDelete statement in PHP
Delete statement in PHP
 
Implode & Explode in PHP
Implode & Explode in PHPImplode & Explode in PHP
Implode & Explode in PHP
 
Types of Error in PHP
Types of Error in PHPTypes of Error in PHP
Types of Error in PHP
 
GET and POST in PHP
GET and POST in PHPGET and POST in PHP
GET and POST in PHP
 
Database connectivity in PHP
Database connectivity in PHPDatabase connectivity in PHP
Database connectivity in PHP
 
Arrays in PHP
Arrays in PHPArrays in PHP
Arrays in PHP
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Top 100 .Net Interview Questions and Answer

  • 1. .NET Interview Questions by Vineet Kumar Saini Q1 - Write a query to find the total number of rows in a table A1 - Select count(*) from t_employee; Q2 - Write a query to eliminate duplicate records in the results of a table A2 - Select distinct * from t_employee; Q3 - Write a query to insert a record into a table A3 - Insert into t_employee values ('empid35','Barack','Obama'); Q4 - Write a query to delete a record from a table A4 - delete from t_employee where id='empid35'; Q5 - Write a query to display a row using index A5 - For this, the indexed column of the table needs to be set as a parameter in the where clause select * from t_employee where id='43'; Q6 - Write a query to fetch the highest record in a table, based on a record, say salary field in the t_salary table A6 - Select max(salary) from t_salary; Q7 - Write a query to fetch the first 3 characters of the field designation from the table t_employee A7 - Select substr(designation,1,3) from t_employee; -- Note here that the substr function has been used. Q8 - Write a query to concatenate two fields, say Designation and Department belonging to a table t_employee Select Designation + ‘ ‘ + Department from t_employee; Q9 -What is the difference between UNION and UNION ALL in SQL? MCN Solutions Pvt. Ltd. Noida
  • 2. .NET Interview Questions by Vineet Kumar Saini A9 - UNION is an SQL keyword used to merge the results of two or more tables using a Select statement, containing the same fields, with removed duplicate values. UNION ALL does the same, however it persists duplicate values. Q10 - If there are 4 SQL Select statements joined using Union and Union All, how many times should a Union be used to remove duplicate rows? A10 - One time. Q11 - What is the difference between IN and BETWEEN, that are used inside a WHERE clause? A11 - The BETWEEN clause is used to fetch a range of values, whereas the IN clause fetches data from a list of specified values. Q12 - Explain the use of the ‘LIKE’ keyword used in the WHERE clause? Explain wildcard characters in SQL. A12 - LIKE is used for partial string matches. The symbol ‘%’ ( for a string of any character ) and ‘_’ (for any single character ) are the two wild card characters used in SQL. Q13 - What is the need to use a LIKE statement? A13 - When a partial search is required in a scencario, where for instance, you need to find all employees with the last name having the sequence of characters "gat", then you may use the following query, to match a search criteria: Select empid, firstname, lastname from t_employee where lastname like ‘%gats%’ This might search all employees with last name containing the character sequence 'gats' like Gates, Gatsby, Gatsburg, Sogatsky, etc. % is used to represent remaining all characters in the name. This query fetches all records contains gats in the e middle of the string. Q14 - Explain the use of the by GROUP BY and the HAVING clause. A14 - The GROUP BY partitions the selected rows on the distinct values of the column on which the group by has been done. In tandem, the HAVING selects groups which match the criteria specified. MCN Solutions Pvt. Ltd. Noida
  • 3. .NET Interview Questions by Vineet Kumar Saini Q15 - In a table t_employee, the department column is nullable. Write a query to fetch employees which are not assigned a department yet. A11. Select empid, firstname, lastname from t_employee where department is null; Q16 -What are the large objects supported by oracle and db2? What are the large objects supported in MS SQL? A16 - In Oracle and DB2 BLOB , CLOB ( Binary Large Objects, Character Large Objects) are used. In MS SQL - the data types are image and varbinary. Q17 - Whats the capacity of the image data type in MS SQL? A17 - Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes. Q18 - Whats the capacity of varbinary data type in MS SQL? A18 - Variable-length binary data with a maximum length of 8,000 bytes. Q19 - What’s the difference between a primary key and a unique key? A19 - Both Primary key and Unique key enforce the uniqueness of a column on which they are defined. However, a Primary key does not allow nulls, whereas unique key allow nulls. Q20 - What are the different types of joins in SQL? INNER JOIN OUTER JOIN LEFT OUTER JOIN RIGHT OUTER JOIN FULL OUTER JOIN INNER JOIN Read here for more http://www.dotnetuncle.com/SQL/What-is-Join-in-SQL-types- of-joins.aspx Q21 - What is a Self join? MCN Solutions Pvt. Ltd. Noida
  • 4. .NET Interview Questions by Vineet Kumar Saini A21 - A join created by joining two or more instances of a same table. Query: Select A.firstname ,B.firstname from t_employee A, t_employee B where A.supervisor_id = B.employee_id; Q22 - What is a transaction and ACID? A22 - Transaction - A transaction is a logical unit of work. All steps must be committed or rolled back. ACID - Atomicity, Consistency, Isolation and Durability, these are the unique entities of a transaction. =========================================================== ========= Short Answer .NET Interview Questions (PAGE 1) Q1. Explain the differences between Server-side and Client-side code? Ans. Server side code will execute at server (where the website is hosted) end, & all the business logic will execute at server end where asclient side code will execute at client side (usually written in javascript, vbscript, jscript) at browser end. Q2. What type of code (server or client) is found in a Code-Behind class? Ans. Server side code. Q3. How to make sure that value is entered in an asp:Textbox control? Ans. Use a RequiredFieldValidator control. Q4. Which property of a validation control is used to associate it with a server control on that page? Ans. ControlToValidate property. Q5. How would you implement inheritance using VB.NET & C#? Ans. C# Derived Class : Baseclass MCN Solutions Pvt. Ltd. Noida
  • 5. .NET Interview Questions by Vineet Kumar Saini VB.NEt : Derived Class Inherits Baseclass Q6. Which method is invoked on the DataAdapter control to load the generated dataset with data? Ans. Fill() method. Q7. What method is used to explicitly kill a user's session? Ans. Session.Abandon() Q8. What property within the asp:gridview control is changed to bind columns manually? Ans. Autogenerated columns is set to false Q9. Which method is used to redirect the user to another page without performing a round trip to the client? Ans. Server.Transfer method. Q10. How do we use different versions of private assemblies in same application without re-build? Ans.Inside the Assemblyinfo.cs or Assemblyinfo.vb file, we need to specify assembly version. assembly: AssemblyVersion Q11. Is it possible to debug java-script in .NET IDE? If yes, how? Ans. Yes, simply write "debugger" statement at the point where the breakpoint needs to be set within the javascript code and also enable javascript debugging in the browser property settings. Q12. How many ways can we maintain the state of a page? Ans. 1. Client Side - Query string, hidden variables, viewstate, cookies 2. Server side - application , cache, context, session, database Q13. What is the use of a multicast delegate? Ans. A multicast delegate may be used to call more than one method. Q14. What is the use of a private constructor? Ans. A private constructor may be used to prevent the creation of an instance for a class. Q15. What is the use of Singleton pattern? MCN Solutions Pvt. Ltd. Noida
  • 6. .NET Interview Questions by Vineet Kumar Saini Ans. A Singleton pattern .is used to make sure that only one instance of a class exists. Q16. When do we use a DOM parser and when do we use a SAX parser? Ans. The DOM Approach is useful for small documents in which the program needs to process a large portion of the document whereas the SAX approach is useful for large documents in which the program only needs to process a small portion of the document. Q17. Will the finally block be executed if an exception has not occurred? Ans.Yes it will execute. Q18. What is a Dataset? Ans. A dataset is an in memory database kindof object that can hold database information in a disconnected environment. Q19. Is XML a case-sensitive markup language? Ans. Yes. Q20. What is an .ashx file? Ans. It is a web handler file that produces output to be consumed by an xml consumer client (rather than a browser). Q21. What is encapsulation? Ans. Encapsulation is the OOPs concept of binding the attributes and behaviors in a class, hiding the implementation of the class and exposing the functionality. Q22. What is Overloading? Ans. When we add a new method with the same name in a same/derived class but with different number/types of parameters, the concept is called overluoad and this ultimately implements Polymorphism. Q23. What is Overriding? Ans.When we need to provide different implementation in a child class than the one provided by base class, we define the same method with same signatures in the child class and this is called overriding. Q24. What is a Delegate? MCN Solutions Pvt. Ltd. Noida
  • 7. .NET Interview Questions by Vineet Kumar Saini Ans. A delegate is a strongly typed function pointer object that encapsulates a reference to a method, and so the function that needs to be invoked may be called at runtime. Q25. Is String a Reference Type or Value Type in .NET? Ans. String is a Reference Type object. Q26. What is a Satellite Assembly? Ans. Satellite assemblies contain resource files corresponding to a locale (Culture + Language) and these assemblies are used in deploying an application globally for different languages. Q27. What are the different types of assemblies and what is their use? Ans. Private, Public(also called shared) and Satellite Assemblies. Q28. Are MSIL and CIL the same thing? Ans. Yes, CIL is the new name for MSIL. Q29. What is the base class of all web forms? Ans. System.Web.UI.Page Q30. How to add a client side event to a server control? Ans. Example... BtnSubmit.Attributes.Add("onclick","javascript:fnSomeFunctionInJavascript()"); Q31. How to register a client side script from code-behind? Ans. Use the Page.RegisterClientScriptBlock method in the server side code to register the script that may be built using a StringBuilder. Q32. Can a single .NET DLL contain multiple classes? Ans. Yes, a single .NET DLL may contain any number of classes within it. Q33. What is DLL Hell? Ans. DLL Hell is the name given to the problem of old unmanaged DLL's due to which there was a possibility of version conflict among the DLLs. MCN Solutions Pvt. Ltd. Noida
  • 8. .NET Interview Questions by Vineet Kumar Saini Q34. can we put a break statement in a finally block? Ans. The finally block cannot have the break, continue, return and goto statements. Q35. What is a CompositeControl in .NET? Ans. CompositeControl is an abstract class in .NET that is inherited by those web controls that contain child controls within them. Q36. Which control in asp.net is used to display data from an xml file and then displayed using XSLT? Ans. Use the asp:Xml control and set its DocumentSource property for associating an xml file, and set its TransformSource property to set the xml control's xsl file for the XSLT transformation. Q37. Can we run ASP.NET 1.1 application and ASP.NET 2.0 application on the same computer? Ans. Yes, though changes in the IIS in the properties for the site have to be made during deployment of each. Q38. What are the new features in .NET 2.0? Ans. Plenty of new controls, Generics, anonymous methods, partial classes, iterators, property visibility (separate visibility for get and set) and static classes. Q39. Can we pop a MessageBox in a web application? Ans. Yes, though this is done clientside using an alert, prompt or confirm or by opening a new web page that looks like a messagebox. Q40. What is managed data? Ans. The data for which the memory management is taken care by .Net runtime’s garbage collector, and this includes tasks for allocation de-allocation. Q41. How to instruct the garbage collector to collect unreferenced data? Ans. We may call the garbage collector to collect unreferenced data by executing the System.GC.Collect() method. MCN Solutions Pvt. Ltd. Noida
  • 9. .NET Interview Questions by Vineet Kumar Saini Q42. How can we set the Focus on a control in ASP.NET? Ans. txtBox123.Focus(); OR Page.SetFocus(NameOfControl); Q43. What are Partial Classes in Asp.Net 2.0? Ans. In .NET 2.0, a class definition may be split into multiple physical files but partial classes do not make any difference to the compiler as during compile time, the compiler groups all the partial classes and treats them as a single class. Q44. How to set the default button on a Web Form? Ans. <asp:form id="form1" runat="server" defaultbutton="btnGo"/> Q45.Can we force the garbage collector to run? Ans. Yes, using the System.GC.Collect(), the garbage collector is forced to run in case required to do so. Q46. What is Boxing and Unboxing? Ans. Boxing is the process where any value type can be implicitly converted to a reference type object while Unboxing is the opposite of boxing process where the reference type is converted to a value type. Q47. What is Code Access security? What is CAS in .NET? Ans. CAS is the feature of the .NET security model that determines whether an application or a piece of code is permitted to run and decide the resources it can use while running. Q48. What is Multi-tasking? Ans. It is a feature of operating systems through which multiple programs may run on the operating system at the same time, just like a scenario where a Notepad, a Calculator and the Control Panel are open at the same time. Q49. What is Multi-threading? Ans. When an application performs different tasks at the same time, the application is said to exhibit multithreading as several threads of a process are running.2 Q50. What is a Thread? MCN Solutions Pvt. Ltd. Noida
  • 10. .NET Interview Questions by Vineet Kumar Saini Ans. A thread is an activity started by a process and its the basic unit to which an operating system allocates processor resources. Q51. What does AddressOf in VB.NET operator do? Ans. The AddressOf operator is used in VB.NET to create a delegate object to a method in order to point to it. Q52. How to refer to the current thread of a method in .NET? Ans. In order to refer to the current thread in .NET, the Thread.CurrentThread method can be used. It is a public static property. Q53. How to pause the execution of a thread in .NET? Ans. The thread execution can be paused by invoking the Thread.Sleep(IntegerValue) method where IntegerValue is an integer that determines the milliseconds time frame for which the thread in context has to sleep. Q54. How can we force a thread to sleep for an infinite period? Ans. Call the Thread.Interupt() method. Q55. What is Suspend and Resume in .NET Threading? Ans. Just like a song may be paused and played using a music player, a thread may be paused using Thread.Suspend method and may be started again using the Thread.Resume method. Note that sleep method immediately forces the thread to sleep whereas the suspend method waits for the thread to be in a persistable position before pausing its activity. Q56. How can we prevent a deadlock in .Net threading? Ans. Using methods like Monitoring, Interlocked classes, Wait handles, Event raising from between threads, using the ThreadState property. Q57. What is Ajax? Ans. AsyncronousJavascript and XML - Ajax is a combination of client side technologies that sets up asynchronous communication between the user interface and the web server so that partial page rendering occur instead of complete page MCN Solutions Pvt. Ltd. Noida
  • 11. .NET Interview Questions by Vineet Kumar Saini postbacks. Q58. What is XmlHttpRequest in Ajax? Ans. It is an object in Javascript that allows the browser to communicate to a web server asynchronously without making a postback. Q59. What are the different modes of storing an ASP.NET session? Ans. InProc (the session state is stored in the memory space of the Aspnet_wp.exe process but the session information is lost when IIS reboots), StateServer (the Session state is serialized and stored in a separate process call Viewstate is an object in .NET that automatically persists control setting values across the multiple requests for the same page and it is internally maintained as a hidden field on the web page though its hashed for security reasons. Q60. What is a delegate in .NET? Ans. A delegate in .NET is a class that can have a reference to a method, and this class has a signature that can refer only those methods that have a signature which complies with the class. Q61. Is a delegate a type-safe functions pointer? Ans. Yes Q62. What is the return type of an event in .NET? Ans. There is No return type of an event in .NET. Q63. Is it possible to specify an access specifier to an event in .NET? Ans. Yes, though they are public by default. Q64. Is it possible to create a shared event in .NET? Ans. Yes, but shared events may only be raised by shared methods. Q65. How to prevent overriding of a class in .NET? Ans. Use the keyword NotOverridable in VB.NET and sealed in C#. Q66. How to prevent inheritance of a class in .NET? MCN Solutions Pvt. Ltd. Noida
  • 12. .NET Interview Questions by Vineet Kumar Saini Ans. Use the keyword NotInheritable in VB.NET and sealed in C#. Q67. What is the purpose of the MustInherit keyword in VB.NET? Ans. MustInherit keyword in VB.NET is used to create an abstract class. Q68. What is the access modifier of a member function of in an Interface created in .NET? Ans. It is always public, we cant use any other modifier other than the public modifier for the member functions of an Interface. Q69. What does the virtual keyword in C# mean? Ans. The virtual keyword signifies that the method and property may be overridden. Q70. How to create a new unique ID for a control? Ans. ControlName.ID = "ControlName" + Guid.NewGuid().ToString(); //Make use of the Guid class Q71A. What is a HashTable in .NET? Ans. A Hashtable is an object that implements the IDictionary interface, and can be used to store key value pairs. The key may be used as the index to access the values for that index. Q71B. What is an ArrayList in .NET? Ans. Arraylist object is used to store a list of values in the form of a list, such that the size of the arraylist can be increased and decreased dynamically, and moreover, it may hold items of different types. Items in an arraylist may be accessed using an index. Q72. What is the value of the first item in an Enum? 0 or 1? Ans. 0 Q73. Can we achieve operator overloading in VB.NET? Ans. Yes, it is supported in the .NET 2.0 version, the "operator" keyword is used. MCN Solutions Pvt. Ltd. Noida
  • 13. .NET Interview Questions by Vineet Kumar Saini Q74. What is the use of Finalize method in .NET? Ans. .NET Garbage collector performs all the clean up activity of the managed objects, and so the finalize method is usually used to free up the unmanaged objects like File objects, Windows API objects, Database connection objects, COM objects etc. Q75. How do you save all the data in a dataset in .NET? Ans. Use the AcceptChanges method which commits all the changes made to the dataset since last time Acceptchanges was performed. Q76. Is there a way to suppress the finalize process inside the garbage collector forcibly in .NET? Ans. Use the GC.SuppressFinalize() method. Q77. What is the use of the dispose() method in .NET? Ans. The Dispose method in .NET belongs to IDisposable interface and it is best used to release unmanaged objects like File objects, Windows API objects, Database connection objects, COM objects etc from the memory. Its performance is better than the finalize() method. Q78. Is it possible to have have different access modifiers on the get and set methods of a property in .NET? Ans. No we can not have different modifiers of a common property, which means that if the access modifier of a property's get method is protected, and it must be protected for the set method as well. Q79. In .NET, is it possible for two catch blocks to be executed in one go? Ans. This is NOT possible because once the correct catch block is executed then the code flow goes to the finally block. Q80. Is there any difference between System.String and System.StringBuilder classes? Ans. System.String is immutable by nature whereas System.StringBuilder can have a mutable string in which plenty of processes may be performed. MCN Solutions Pvt. Ltd. Noida
  • 14. .NET Interview Questions by Vineet Kumar Saini Q81. What technique is used to figure out that the page request is a postback? Ans. The IsPostBack property of the page object may be used to check whether the page request is a postback or not. IsPostBack property is of the type Boolean. Q82. Which event of the ASP.NET page life cycle completely loads all the controls on the web page? Ans. The Page_load event of the ASP.NET page life cycle assures that all controls are completely loaded. Even though the controls are also accessible in Page_Init event but here, the viewstate is incomplete. Q83. How is ViewState information persisted across postbacks in an ASP.NET webpage? Ans. Using HTML Hidden Fields, ASP.NET creates a hidden field with an ID="__VIEWSTATE" and the value of the page's viewstate is encoded (hashed) for security. Q84. What is the ValidationSummary control in ASP.NET used for? Ans. The ValidationSummary control in ASP.NET displays summary of all the current validation errors. Q85. What is AutoPostBack feature in ASP.NET? Ans. In case it is required for a server side control to postback when any of its event is triggered, then the AutoPostBack property of this control is set to true. Q86. What is the difference between Web.config and Machine.Config in .NET? Ans. Web.config file is used to make the settings to a web application, whereas Machine.config file is used to make settings to all ASP.NET applications on a server(the server machine). Q87. What is the difference between a session object and an application object? Ans. A session object can persist information between HTTP requests for a particular user, whereas an application object can be used globally for all the users. MCN Solutions Pvt. Ltd. Noida
  • 15. .NET Interview Questions by Vineet Kumar Saini Q88. Which control has a faster performance, Repeater or Datalist? Ans. Repeater. Q89. Which control has a faster performance, Datagrid or Datalist? Ans. Datalist. Q90. How to we add customized columns in a Gridview in ASP.NET? Ans. Make use of the TemplateField column. Q91. Is it possible to stop the clientside validation of an entire page? Ans. Set Page.Validate = false; Q92. Is it possible to disable client side script in validators? Ans. Yes. simplyEnableClientScript = false. Q93. How do we enable tracing in .NET applications? Ans. <%@ Page Trace="true" %> Q94. How to kill a user session in ASP.NET? Ans. Use the Session.abandon() method. Q95. Is it possible to perform forms authentication with cookies disabled on a browser? Ans. Yes, it is possible. Q96. What are the steps to use a checkbox in a gridview? Ans. <ItemTemplate> <asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="Check_Clicked"></asp:CheckBox> </ItemTemplate> Q97. What are design patterns in .NET? Ans. A Design pattern is a repeatitive solution to a repeatitive problem in the design of a software architecture. MCN Solutions Pvt. Ltd. Noida
  • 16. .NET Interview Questions by Vineet Kumar Saini Q98. What is difference between dataset and datareader in ADO.NET? Ans. A DataReader provides a forward-only and read-only access to data, while the DataSet object can carry more than one table and at the same time hold the relationships between the tables. Also note that a DataReader is used in a connected architecture whereas a Dataset is used in a disconnected architecture. Q99. Can connection strings be stored in web.config? Ans. Yes, in fact this is the best place to store the connection string information. Q100. Whats the difference between web.config and app.config? Ans. Web.config is used for web based asp.net applications whereas app.config is used for windows based applications. MCN Solutions Pvt. Ltd. Noida