0% found this document useful (0 votes)
9 views6 pages

Microsoft .NET Exam Questions - DAC 2006

The document is a written examination question paper for a Microsoft .NET module from ACTS Training Centre, Pune, dated June 20, 2006. It consists of 50 multiple-choice questions covering various topics related to C# and .NET, each carrying 2 marks. The questions address concepts such as shared assemblies, delegates, C# syntax, and ASP.NET functionalities.

Uploaded by

Tejas Thite
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

Microsoft .NET Exam Questions - DAC 2006

The document is a written examination question paper for a Microsoft .NET module from ACTS Training Centre, Pune, dated June 20, 2006. It consists of 50 multiple-choice questions covering various topics related to C# and .NET, each carrying 2 marks. The questions address concepts such as shared assemblies, delegates, C# syntax, and ASP.NET functionalities.

Uploaded by

Tejas Thite
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ACTS TRAINING CENTRE – IET, Pune

Written Examination Question Paper


DAC - Feb 2006
Module Name: Microsoft .NET

Date: June 20, 2006 Duration: 1 Hour Max. Marks: 100

Each Question carries 2 Marks .


Q.1) Shared Assemblies are installed at:
A. System Assembly Cache B. Global Assembly Cache
C. Machine Assembly Cache D. Windows Assembly Cache
Q.2) What are delegates?
A. Value Pointer B. Function Pointer C. Pass By Reference D. Pass By Value
Q.3) “XYZ” company wants to revamp his website. One of the important changes “XYZ” wants is to
display Ad banners. As a developer you want to initialize the banner image paths when the first user
accesses the application. So what will you do?
A. Add code in application_onstart event of [Link] file
B. Add code in application_begin request event of [Link] file
C. Add code to session_onstart event of [Link]
D. Add code in [Link] event handler in the startup page of the application
Q.4) Which of the following is a value type, and not a reference type?
A. Array B. delegate C. enum D. class
Q.5) What is the difference between Overridding and Overloading?
A. Overridding, same name with different return type and overloading same name with different
argument
B. Overridding is dynamic, overloading is static
C. Overridding, same signature with different definition, overloading has different signature
D. All the above
Q.6) Pick the command line that would result in the C# compiler generating an XML documentation file:
A. csc /doc:[Link] [Link]
B. csc /doc /docfile:[Link] HelloWorld.c
C. csc /doc /out:[Link] [Link]
D. csc /xml [Link]
Q.7) Which of the following is not a method of [Link]?
A. GetType B. ToString C. Equals D. Clone
Q.8) When creating a C# Class Library project, what is the name of the supplementary file that Visual
[Link] creates that contains General Information about the assembly?
A. [Link] B. [Link]
C. [Link] D. [Link]
Q.9) What is a formatter?
A. Object B. Class C. Method D. None
Q.10) All types derive from a single base type called:
A. [Link] B. [Link] C. [Link] D. [Link]

TCT / F / 03 Rev. –03 Page 1 of 6


ACTS TRAINING CENTRE – IET, Pune

Q.11) A reference to a reference-type instance requires how many bytes?


A. 2 bytes B. 4 bytes C. 8 bytes D. 16 bytes
Q.12) In C#, which of the following is not a valid C# jump statement?
A. Jump B. goto C. return D. throw
Q.13) When an integral literal is valid for several possible integral types, the default type chosen goes in
which order?
A. uint, int, ulong, long B. long, ulong, int, uint
C. ulong, long, uint, int D. int, uint, long, ulong
Q.14) What is the comment syntax for C#'s XML-based documentation?
A. /** and **/ B. //# C. /// D. //*
Q.15) Which of the following is the C# escape character for Null?
A. \n B. \0 C. \f D. \v
Q.16) What is the exception that is thrown when there is an attempt to dynamically access a method that
does not exist?
A. MissingMethodException B. TypeLoadException
C. MethodLoadException D. MethodAccessException
Q.17) Which of the following is the correct way to disable session state in an [Link] page?
A. <%@ Page SessionState="false" %>
B. <%@ Page UseSessionState="false" %>
C. <%@ Page DisableSessionState="true" %>
D. <%@ Page EnableSessionState="false" %>
Q.18) What is the term used to describe the process the Runtime uses to find an assembly?
A. Locating B. Probing C. Searching D. Resolving
Q.19) Which keyword is used in C# to prevent a class from being inherited by another class?
A. override B. protected C. sealed D. NotInheritable
Q.20) Which C# statement is actually a shortcut for calling the Enter and Exit methods of the Monitor
class?
A. MissingMethodException B. TypeLoadException
C. MethodLoadException D. MethodAccessException
Q.21) In C#, what character is used to indicate a verbatim string literal?
A. @ B.! C. " D. #
Q.22) C# types are defined in ___, organized by _____, compiled into ____, and then grouped into ____.
A. files, modules, namespaces, assemblies
B. files, namespaces, assemblies, modules
C. files, assemblies, namespaces, modules
D. files, namespaces, modules, assemblies
Q.23) Which C# statement is actually a shortcut for calling the Enter and Exit methods of the Monitor
class?
A. mutex B. lock C. semaphore D. thread
Q.24) Which interface allows a collection to be navigated using the foreach statement?
A. INavigator B. ICollection C. IEnumerator D. IEnumerable

TCT / F / 03 Rev. –03 Page 2 of 6


ACTS TRAINING CENTRE – IET, Pune

Q.25) You work as software developer at XYZ Ltd. You need to develop Win Form that provides online
help for users. You want the help functionality to be available when users press the F1 key.
Help text will be displayed in a pop-up window for the text box that has focus.
To implement this functionality, you need to call a method of the HelpProvider control and pass the text
box and the help text.

What should you do?


A. SetShowHelp B. SetHelpString C. SetHelpKeyword D. ToString
Q.26) You are a developer for a XYZ Ltd. that provides free software over the Internet. You are
developing en e-mail application that users all over the world can download.
The application displays text strings in the user interface. At run time, these text strings must appear in
the language that is appropriate to the locale setting of the computer running the application. You have
resources to develop versions of the application for only four different cultures. You must ensure that
your application will also be usable by people of other cultures.
How should you prepare the application for deployment?
A. Package a different assembly for each culture.
B. Package a different executable file for each culture.
C. Package a main assembly for source code and the default culture.
Package satellite assemblies for the other cultures.
D. Package a main assembly for source code.
Package satellite assemblies for each culture.
Q.27) You use Visual Studio .NET to create a Windows-based application that will track XYZ sales. The
application’s main object is named XYZ. The XYZ class is created by the following definition:
public class XYZ
{
.
}
You write code that sets properties for the XYZ class. This code must be executed as soon as an instance
of the XYZ class is created. Now you need to create a procedure in which you can place your code.
Which code segment should you use?
A. public XYZ() B. public void XYZ () C. public bool XYZ ()
D. public New() E. public XYZ New() F. public XYZ XYZ()
Q.28) You develop a Windows-based application by using Visual Studio .NET. The application includes
a form named XYZForm and a class named Contact. XYZForm includes a button named
cmdCreateContact. You must ensure that your application creates an instance of Contact when a user
clicks this button. You want to write the most efficient code possible.
Which code segment should you use?
A. Contact contact = new Object();
B. Contact contact = new Contact;
C. Object contact = new Contact;
D. Contact contact = new Object;
Q.29) You are creating an [Link] page for XYZ. You create a DataGrid control that displays past
purchases made by the user. The DataGrid control is populated from an existing database when the page
is created. The page contains TextBox controls that allow users to update their personal information, such
as address and telephone number. You need to ensure that the page is refreshed as quickly as possible
when users update their contact information.
What should you do?
A. Set the Enable property of the DataGrid control to false.
B. Set the EnableViewState property of the DataGrid to false.

TCT / F / 03 Rev. –03 Page 3 of 6


ACTS TRAINING CENTRE – IET, Pune

C. Write code in the [Link] event handler that populates the DataGrid control only when the
IsPostBack property of the page is false.
D. Write in the [Link] event handler that populates the DataGrid control only when the
IsPostBack property of the page is true.

Q.30) You create an [Link] application for XYZ Ltd. The company uses Microsoft Windows
authentication. All users are in the XYZ domain.
You want to configure the application to use the following authorization rules:
• Anonymous users must not be allowed to access the application.
• All employees except Martin and Peter must be allowed to access the application.
Which code segment should you use to configure the application?
A. <authorization>
<deny users=”XYZ\Martin, XYZ\Peter”>
<allow users=”*”>
<deny users=”?”>
</authorization>
B. <authorization>
<allow users=”*”>
<deny users=”XYZ\Martin, XYZ\Peter”>
<deny users=”?”>
</authorization>
C. <authorization>
<deny users=”XYZ\Martin, XYZ\Peter”>
<deny users=”?”>
<allow users=”*”>
</authorization>
D. <authorization>
<allow users=”XYZ\Martin, XYZ\Peter”>
<allow users=”*”>
</authorization>
Q.31) How many parameters u can pass to stored procedure written in SQL Server 2000?
A. 32 B. 64 C. 512 D. 1024
Q.32) How can you implement late binding in .NET?
A. By using P/Invoke Technique
B. Register the assembly as COM component and add a reference to this component
C. By using Reflection
D. None of the above
Q.33) How can you prevent your .NET projects outputs (dll or exe) from being disassembled?
A. Digitally sign the project output
B. Obfuscate the project output
C. Implement Code Access Security feature of the .NET framework
D. Deploy the application in the GAC
Q.34) What is Boxing?
A. The conversion of a value type to an object instance
B. The conversion of an object instance to a value type.
C. The conversion of a value type to reference type.
D. The conversion of a reference type to a value type

TCT / F / 03 Rev. –03 Page 4 of 6


ACTS TRAINING CENTRE – IET, Pune

Q.35) Which of the following is Executes the Command and returns a Single Value?
A. ExecuteNonQuery( ) B. ExecuteScalar( ). C. ExecuteReader( ).
D. ExecuteXmlReader( ) E. All of Above
Q.36) In case of interfaces which of the following holds good
A. Not possible to declare fields
B. You can create a property but not define it
C. Interfaces serve as base classes from which you can create derived classes
D. All the above are correct
E. only 2 and 3 are correct
Q.37) Which of the following is true for a special member of the class namely ‘this’
A. this cannot be used in a static method
B. this cannot be used in a class A to access a member of class B
C. The this member can never be declared: it is automatically implied when you create a class
D. All the above are correct
E. None of above
Q.38) What is true about the SingleCall Server Activation Mode?
A. This is the mode where one server object is used by all clients
B. This mode creates a new instance of the server object for every client connection
C. This mode is used to share data between clients
D. In this mode the server object will not be destroyed at the end of the method call
Q.39) In .net remoting architecture there are two activation modes for server-activated objects, Singleton
and SingleCall state the difference??
A. Singleton do have a default lifetime associated with them whereas Single Call does not
B. There are no such server-activated objects
C. SingleCall object cant be reused where as singleton object can be reused
D. None of Above
Q.40) The [Link]() method called by Garbage Collector uses following keywords in definition
A. Protected B. Overrides C. Private D. Overridable E. A & B F. C &
D
Q.41) Which of the following is true for Shared Methods in [Link]
A. Across all instances of class
B. Can access any instance variable from any objects
C. Is defined using Sharable keyword.
D. None of above
Q.42) The DragDrop event always ends with following event
A. MouseUp B. MouseDown C. DragDrop D. None of above
Q.43) How many Maximum Parameters a stored Procedure can have in sql server 2000
A. 32 B. 64 C. 256 D. 2100
Q.44) DataReader is connected architecture
A. True B. False
Q.45) Can an [Link] application be run without [Link] & [Link] file?
A. No B. Yes
C. Without [Link] but with [Link] D. Without [Link] but with [Link]

TCT / F / 03 Rev. –03 Page 5 of 6


ACTS TRAINING CENTRE – IET, Pune

Q.46) Can You Edit in Repeater Control?


A. No B. Yes

Q.47) what methods are fired during the page load?


A. Init(),Load(),Unload(),PreRender()
B. Load(),Init(),PreRender(),Unload()
C. Init(),Load(),PreRender(),UnLoad()
D. Init(),Load(),UnLoad(),PreRender()

Q.48) Which of the following class declarations create a new exception named ValidationException?
A. [Exception()]
public class ValidationException {}
B. public exception ValidationException;
C. <Exception()> _
public class ValidationException {}
D. public class ValidationException : IException {}
E. public class ValidationException : [Link] {}

Q.49) What is output of following code?

A. 20 B. 36 C. 48 D. 64 E. 96

Q.50) Which of the following statements describes a difference between an ArrayList and an array in C#?
A. Indexes in an ArrayList are one based and zero based in an Array.
B. ArrayLists can be multidimensional; Arrays cannot.
C. Arrays provide methods to set their capacity equal to the actual number of elements in them;
ArrayLists do not.
D. ArrayLists can contain only one object type; Arrays can contain multiple object types.
E. ArrayLists can automatically grow; Arrays cannot.

------------------------- All the Best --------------------

TCT / F / 03 Rev. –03 Page 6 of 6

You might also like