Upwork/oDesk Dot Net Fundamentals Test



1. Which of the following are the main goals behind ADO .NET?
Answers:
• To provide seamless support for XML
• To support COM directly
• To provide an expandable and scalable data access architecture for the revolutionary n-tier programming model
• To extend the current capabilities of ADO

2. Which of the following are included in a Static assembly?
Answers:
• Modules
• Type metadata
• MSIL code
• Assembly manifest
3. Which of the following are correct about delegates?
Answers:
• A delegate is an object that refers to a subroutine, function or other method
• A delegate variable acts as a pointer to a subroutine or function
• A delegate can not hold the address of a class's shared method
• Delegate variables are sometimes called type-safe function pointers
4. Application domains are created by:
Answers:
• Windows shell
• ASP.Net
• IE
• None of the above
5. Which of the following protocols can be used for .Net Remoting?
Answers:
• TCP
• HTTP
• SMTP
• All of the above
6. Which of the following run In-Process?
Answers:
• EXE file
• Resx file
• DLL file
• OCX file
7. Which of the following methods are used to stop a thread?
Answers:
• Thread.Interrupt()
• Thread.Suspend()
• Thread.Sleep()
• Thread.Abort()
8. Which of the following is correct for value and reference types in .NET?
Answers:
• Value types directly contain their data
• Reference types store a reference to the value's memory address
• Value types can be built-in but can't be user-defined
• All of the above
9. Which of these are runtime hosts in .Net Framework?
Answers:
• CLR
• IE
• IIS
• ASP.NET
10. A manifest includes the following data about the assembly
Answers:
• File list
• None
• Referenced assemblies
• MSIL information
11. The Process of automatic memory management involves the following tasks:
Answers:
• Allocating memory
• Registering memory
• Implementing finalizers
• Using destroy
12. A standard Windows PE file is divided into a number of sections. Which of the following are not valid native image sections?
Answers:
• .textdata
• .data
• .rpdata
• .rsrc
13. Which of the following statements is true?
Answers:
• You can access managed data from managed code
• You can access managed data from managed and unmanaged code
• Managed code can access both managed and unmanaged data
• Managed code cannot access both managed and unmanaged data
14. Which of the following statements is correct with regard to .NET framework managed web pages?
Answers:
• They interact directly with the runtime
• They do not execute in the native code language
• They are interpreted and scripted
• All of the above
15. When are AssemblyHash values used?
Answers:
• They are used throughout the common language runtime to detect a change in assembly contents
• They are used in the Common type system for type safety
• They are used to change the metadata information in assemblies
16. Where is the Shared assembly generally stored?
Answers:
• Application's directory
• Global assembly cache
• C drive
• None of the above
17. Which of the following are public methods of System.Object?
Answers:
• GetHashCode()
• GetType()
• Equals()
• All of the above
18. What does Managed Data refer to?
Answers:
• The data stored by CLR
• The data allocated by CLR GC
• The data de-allocated by CLR GC
• The data allocated and de-allocated by CLR GC
19. What is the command "caspol -lg" used for?
Answers:
• To see the private assemblies
• To see the assemblies in GAC
• To see the code groups defined on your system
• To see the metadata information
20. Why doesn't .Net runtime offer deterministic destruction?
Answers:
• Due to CTS
• Due to Finalize class
• Due to garbage collection algorithm
• Due to the JIT
21. Which of the following is used to notify all waiting threads of a change in the object's state?
Answers:
• The system.Threading.Monitor.ReferenceEquals method
• The system.Threading.Monitor.Enter method
• The system.Threading.Monitor.PulseAll method
• The system.Threading.Monitor.TryEnter method
22. Which of the following manages the code during execution?
Answers:
• Coding Manager
• JIT
• COde Manager
• Coder Manager
23. How many application domains can exist inside a Win32 process?
Answers:
• 1
• 2
• Any number
• 4
24. Delay signing allows a shared assembly to be signed with:
Answers:
• Private key at the initial stage
• Private and Public key at the initial stage
• Private key at a later stage
• Public key at a later stage
25. Where is the application domain created?
Answers:
• Outside a Process
• Inside a Process
• Can be created in both the places
• None of the above
26. What are the core components of .NET framework data provider model?
Answers:
• DataAdapter and DataReader
• Connection and Command
• DataAdapter, Connection, and Command
• DataAdapter , DataReader, Connection, and Command
27. Which of the following protocols can be used for ASP.Net Web Services?
Answers:
• TCP
• HTTP
• SMTP
• All of the above
28. C# has a keyword called int. Which .NET type does this map to?
Answers:
• System.Int16
• System.Int32
• System.Int64
• System.Int128
29. Code Manager is a the part of:
Answers:
• CTS
• CLI
• CLS
• CLR
30. Consider the following two statements and choose the most appropriate option:

Statement 1: Value types are allocated on a stack
Statement 2: Reference types are allocated on a managed CLR Heap
Answers:
• Statement 1 is true and statement 2 is false
• Statement 2 is true and statement 1 is false
• Both statements 1 and 2 are true
• Both statements 1 and 2 are false
31. Which of the following services are provided by CLR?
Answers:
• Application memory isolation
• Code Management
• Verification of type safety
• Conversion of IL to native code
• All of the above
32. Compilers of CLS compliant language generate:
Answers:
• MSIL code and Metadata
• MSIL code
• Metadata
• Machine code
33. How does CLR allow multiple applications to be run in a single process?
Answers:
• By running them in a special application domain
• By making sub process for each process
• By loading them in separate application domains
• None of the above
34. Which of the following is valid and is included in the type definition?
Answers:
• Any attribute that is defined in the type
• The name of the type
• The visibility of the type
• The base types of the type
• All of the above
• None of the above
35. For MSIL code to be executed in PE file, it is necessary to have:
Answers:
• Assembly manifest
• Modules
• Files
• Types
36. What happens when enough memory is not available to be allocated to an object?
Answers:
• MemoryFull exception is thrown
• Garbage collector is automatically run to free up memory
• OutOfMemory exception is thrown
• The .Net worker process is restarted
37. You can create the remote application domain using:
Answers:
• AppDomain.BuldDomain
• AppDomain.MakeDomain
• AppDomain.CreateDomain
• AppDomain.GenerateDomain
38. Which base class do all web forms inherit from?
Answers:
• System.Web.UI.Page
• System.Web.UI.HtmlControls
• System.Web.UI.WebControls
• None of the above
39. Which of the following is used to do garbage collection?
Answers:
• gc.Collect
• gc.KeepAlive
• gc.SuppressFinalize
40. You assigned the version number - 5.3.1.0 to your assembly.

The four digits stand for:
Answers:
• Revision, Built, Major Version, and Minor version
• Revision, Built, Minor Version, and Major version
• Built, Major version, Minor Version, and Revision
• Major version, Minor Version, Built, and Revision
41. Xcopy method is not sufficient for deployment:
Answers:
• When application relies on shared assemblies
• When application is downloaded on demand
• When the number of assemblies is too large
• None of the above
42. Dot Net Framework consists of :
Answers:
• Common language runtime
• Set of class libraries
• Common language runtime and set of class libraries
• Common language runtime, set of class Libraries, and ADO.NET
43. Which of the following should you use to serialize instances of a class?
Answers:
• XMlSerializer
• It depends on the situtaion
• SoapFormatter
• BinaryFormatter
44. ___________ class grants the permission to manipulate files located in the code assemblies, to code assemblies that match the membership condition.
Answers:
• FileCodeGroup
• FirstMatchCodeGroup
• CodeFileGroup
• CodeGroup
45. In.NET generics, the type parameter:
Answers:
• Needs to be constrained in container classes
• Needs to be constrained in all the classes
• Cannot be constrained in container classes
• Cannot be constrained in any class
46. How many classes can a single .NET DLL contain?
Answers:
• 10
• 20
• Unlimited
• 5
47. Which of the following is not correct with regard to shared assembly?
Answers:
• Its version can be controlled by the author only
• It can be shared by many applications
• It must get registered with the machine registry
• It is installed in the global assembly cache
48. Which Portable Executable (PE) file does not contain the assembly manifest?
Answers:
• Executable
• DLL
• Module
• ALL
49. In .NET framework, what are the options available for packaging?
Answers:
• CAB
• EXE
• MSI
• All of the above
50. Which of the following helps expose COM components to the .NET framework?
Answers:
• RCW
• CCA
• CWA
• CCW
51. Which of the following tools can be used to get the metadata information about the assembly and view IL code?
Answers:
• soapsuds.exe
• lldasm.exe
• al.exe
• PerfMon.exe
• SN.exe
52. Which of the following tools assists Assembly Signing?
Answers:
• CASPol.exe
• PerfMon.exe
• SN.exe
• soapsuds.exe
53. In which file can you define the "Process Model" attribute?
Answers:
• Web.config
• Machine.config
• In both files
• In neither file
54. Which of the options is being referred to in the following statement:

"All incoming requests are processed by a single server object"
Answers:
• SingleCall
• Client-activated object
• Singleton
• None of these
55. A user application-domain can be created:
Answers:
• Automatically
• By using a static method "CreateAppDomain"
• By using a static method "CreateDomain"
• By using a non static method "CreateAppDomain"
56. The global assembly cache:
Answers:
• Can store two dll files with the same name
• Can store two dll files with the same name, but different version
• Can store two dll files with the same name and same version
• Can not store dll files with the same name
57. Which tool can you use to register managed types with the Windows registry?
Answers:
• SN.exe
• Regasm.exe
• lldasm.exe
• none
58. Which of the following files is used to implement application and session level events?
Answers:
• Global.asax
• Web.config
• Machine.config
• None of the above
59. Which of these classes are used for loading an assembly into an application domain?
Answers:
• System.Configuration.Assemblies
• system.componentModel
• System.Resources
• System.AppDomain
60. Which of the following tools can be used to modify and grant permissions to code groups?
Answers:
• Soapsuds.exe
• Lldasm.exe
• CASPol.exe
• PerfMon.exe
• SN.exe
61. Which of the following does not use metadata?
Answers:
• CLR
• CTS
• JIT compilers
• Class loader
• None of the above
62. Which of the following functionalities does System.Diagnostics class provide?
Answers:
• Reflection
• Trace
• Manage code
• Remoting
63. An application can have any number of modules and files. Which of the following is used to link them together into a single assembly?
Answers:
• al.exe
• ac.exe
• bl.exe
• ad.exe
64. Which of the following is a must for a private assembly?
Answers:
• Cryptographically strong name
• Unique name
• Cryptographically Light name
• Global assembly cache
65. Which type of parameter is passed in subroutines by default?
Answers:
• ByRef
• ByVal
66. Which of the following is not a member of the Exception class?
Answers:
• StackTraceID
• Message
• InnerException
• TargetSite
67. Which transport protocol is used to call a Web Service?
Answers:
• SOAP
• HTTP
• SMTP
• ALL
68. Which of the following helps Assemblies become self describing?:
Answers:
• JIT
• Manifest
• CTS
• Application Domain
69. How will you use the thread pool?
Answers:
• By calling the ThreadPool.UserQueueWorkItem() method directly
• By passing an instance of WaitCallback delegate to the ThreadPool.QueueUserWorkItem() method
• By passing an instance of WaitCallback delegate to the ThreadPool.UserQueueWorkItem() method
• By passing an instance of StayCallback delegate to the ThreadPool.QueueUserWorkItem() method
70. The runtime is started automatically by ______________ when the .exe is run.
Answers:
• mscore.dll
• mscoree.dll
• mscor.dll
• mscoren.dll
71. Because .NET treats all languages as equal, a class written in C# should be equivalent to a class written in VB.NET, and an interface defined in Managed C++ should be exactly the same as one that is specified in Managed COBOL. Languages must agree on the meanings of these concepts before they can integrate with one another.

Which of the following provides the specifications for this?
Answers:
• CLS
• CTS
• MSIL
• CLI
72. .Net assembly stores both data and IL code. A tool is available along with the .NET framework to view within the PE. Which of the following is that tool?
Answers:
• ildasm.exe
• disasm.exe
• deassmbler.exe
• deasm.exe
73. Which of these files is used for debugging an application?
Answers:
• demo.dll
• demo.pdb
• demo.res
• Any of these can be used
74. Which of these is used to allow managed code to interoperate with unmanaged code?
Answers:
• COM
• COM Marshaler
• XML
• SOAP
75. Which of the following statements is correct.
(a)A Try block must include Catch or Finally sections.
(b)Using an empty Finally section is illegal.
Answers:
• Only (a) is true
• Only (b) is true
• Both (a) and (b) are false
• Both (a) and (b) are true
76. The _________________ methods are primarily meant for COM Interoperability use.
Answers:
• System.AppDomain.ApplyPolicy
• System.AppDomain.CreateComInstanceFrom
• System.AppDomain.Load
• System.AppDomain.GetAssemblies
77. _____________ helped overcome the DLL conflict (faced by the versions prior to .NET).
Answers:
• Strong-named assemblies
• Version-aware code storage
• Components executing in isolation
• All of the above
78. __________ is used to generate the assembly from modules.
Answers:
• soapsuds.exe
• lldasm.exe
• al.exe
• PerfMon.exe
• SN.exe
79. Which of the following is used as a Serializer for the web services?
Answers:
• XmlSerializer
• SoapSerializer
• BinaryFormatter
• SoapFormatter
80. The IL to native code compilation is done by:
Answers:
• Code Manager
• CTS
• JIT
• CLS
81. ____ is a subset of the CTS.
Answers:
• CLI
• cLS
• CLR
• None of these
82. Which of the following statements is correct?
Answers:
• For in-process communication between contexts within a single application domain, Serialization is used as an interception mechanism.
• For in-process communication between contexts within a single application domain, Marshaling is used as an interception mechanism.
• For in-process communication between contexts within a single application domain, Proxies are used as an interception mechanism.
• All of the above
83. Which of the following are used in combination to create the identity of an assembly?
Answers:
• Assembly name
• Version
• Culture
• Public key
• All of the above
84. Which of these Assemblies is used for doing Localization?
Answers:
• Private
• Public
• Satellite
• Both Public and Private
85. Which of the following is not a feature of .NET 2.0?
Answers:
• Partial classes
• Generics
• Multiple Inheritance
• Partial Methods
86. ___________ namespace is not defined in the base class library.
Answers:
• System
• System.CodeDom
• System.IO
• System.Threading
• System.Text
87. Since .NET assemblies contain IL code, your proprietary algorithms can be seen by anyone. Which of the following tools protects your intellectual properties?
Answers:
• Obfuscator
• Befprotector
• Obadministrator
• Befmanager
88. __________ assembly can be used to deploy language-specific resources for an application.
Answers:
• Shared
• Private
• Satellite
• Public
89. Which of the following can you use to resolve assemblies, types, and resources?
Answers:
• System.AppDomain.CreateDomain
• System.AppDomainSetup.ApplicationBase
• System.AppDomainSetup.CreateComInstanceFrom
• System.AppDomain.ApplyPolicy
90. .NET components are accessed from COM via a?
Answers:
• RCW
• CCA
• CWA
• CCW
91. How will you prevent concurrent access to your data?
Answers:
• By using System.Threading.ThreadStart
• By using System.Threading.Monitor.Enter/Exit methods
• By using System.Threading.Monitor.start/End methods
• By using System.Threading.ThreadEnter
92. Which of the following is correct for CTS?
Answers:
• It establishes a framework that helps enable cross-language integration, type safety, and high performance code execution
• It provides an object-oriented model that supports the complete implementation of many programming languages
• It defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other
• All of the above
93. Microsoft .NET supports value types for performance reasons, but everything in .NET is ultimately an object. Value types are allocated on the stack by default, but they can always be converted into a heap-based, reference-type object.
What is this conversion called?
Answers:
• Conving
• Boxing
• TypeModification
• None of the above
94. A hashtable is serialized by using:
Answers:
• XmlSerializer or SoapFormatter
• XmlSerializer
• SoapFormatter
• XmlSerializer and SoapFormatter
95. The .NET framework comes with a  few CLR hosts. Which of the following is a CLR host?
Answers:
• ASP.NET
• IE
• Shell Executables
• All of the above
96. Which of the following code is not 'managed' by default in .NET framework?
Answers:
• Visual Basic
• C#
• C++
• Jscript
97. .NET provides a distributed process framework. Which of the following technologies are used for similar function?
Answers:
• Java Remote Method Invocation
• Microsoft Distributed Component Object Model
• Common Object Request Broker Architecture
• Remote Procedure Calls
98. How many bits does the int datatype use in .NET?
Answers:
• 16 bits
• 32 bits
• 64 bits
• None of the above
99. Which of the following tools can be used to configure assemblies located in the GAC?
Answers:
• Soapsuds.exe
• Lldasm.exe
• CASPol.exe
• Mscorcfg.msc
• SN.exe
100. Which of the following is not correct about parameter arrays?
Answers:
• A subroutine can have any numbers of parameter arrays
• A parameter array must come last in the parameter list
• All parameter lists are declared as ByVal
• Parameter array values are implicitly optional
101. Which of the following is incorrect about Structures?
Answers:
• Structures are value types
• A structure can provide a constructor
• Structures can implement inheritance
• Structures support events
102. Which of the following is not a valid inheritance_mode?
Answers:
• Overloads
• Overrides
• Overridable
• MustOverridable
• None of the above
103. In .NET framework, Reflection is used to:
Answers:
• Create metadata of the modules/assemblies
• Get metadata of the modules/assemblies
• Reengineer the corrupted assemblies
• Destroy the corrupted assemblies
104. Which of the following statements is not correct with regard to .NET assemblies?
Answers:
• Static assemblies can include classes, JPEG files, resource files etc.
• Static assemblies are stored on disk in PE files.
• The .NET Framework can create dynamic assemblies
• Dynamic assemblies are automatically saved to disk before execution
105. Which of the following statements is correct with regard to Windows process memory allocation?
Answers:
• Each process (instance of an application) gets its own RAM and prevents the OS from crashing when the process crashes
• RAM is shared between the processes and saves OS crash with the process crash
• Each process gets its own RAM and causes OS to crash with the process crash
• RAM is shared between the processes and causes OS to crash with the process crash
106. The code written to target common language runtime services is called :
Answers:
• Generated Code
• Managed Code
• Unmanaged Code
• CLR Code
• Service Code
107. Which of the following can not be used with files?
Answers:
• FileClose
• FileInput
• LineInput
• LOF
• PrintLine
108. ____________ class defines the set of information that constitutes input to security policy decisions in System.Security.Policy namespace.
Answers:
• FileCodeGroup
• ApplicationTrust
• Evidence
• PolicyLevel
• PolicyStatement

109. Consider the method given below:

void GC.Collect(Int32 Generation)

Which of the following statements would be correct, if you pass 2 as argument (in the above method)?
Answers:
• GC will collect generation 2
• GC will collect generation 1 and 2
• GC will collect generation 0,1 and 2
• GC will collect generation 0
110. The XML web services of .NET framework are built on :
Answers:
• SOAP
• XML
• WSDL
• All of the above
111. Which transport protocol is generally used to call an ASP.NET Web Service?
Answers:
• SOAP
• REST
• WSCL
• ALL
112. which of the following class Serializes and deserializes an object, or an entire graph of connected objects?
Answers:
• XmlSerializer
• SoapFormatter
• None of the above
113. The primary building block of the .NET framework is
Answers:
• ado.NET
• assembly
• JIT
• manifest
114. Application domains are created by runtime host and the runtime host include:
Answers:
• Windows shell
• ASP.NET
• Internet Explorer (IE)
• None of the above
115. Lapsed listener problem:
Answers:
• Is caused in memory destruction
• Is due to leaks in .Net application
• Is caused due to wrong coding
• Is caused due to object being destroyed