dot net mcq questions



    

1.The metadata of the .Net assembly is stored in which file?


A .dll

B .exe

C .manifest

D .core

2.Which of the following is not a valid data type in .Net?

A Double

B Int32

C Int16

D MIME

3. What are the features of .Net 4.5?

A. Portable class library

B. Parallel processing

C. .Net for Windows Store apps

D. All the answers are true

4.Which of the following constitutes the .NET Framework? i. ASP.NET Applications ii. CLR  iii. Framework Class Library iv. WinForm Appliation  v. Windows Services 

A. 2,3

B. 1,2

C. 2,5

D. 3,4

5.Why would Pre-JIT be used by the .NET Framework ?

A. to compile only the methods that are called at runtime and store those methods in cache aftr execution 

B.to compile complete source code into native in a single compilation cycle during deployment of the application 

C.to compile only the methods that are called at runtime and then store them in cache for one minute

D.to compile only the methods that are called at runtime and remove them from memory after execution

6.Which of the following jobs are done by Common Language Runtime? 1.It provide core services such as memory management,thread management,and remoting.2.It enforces strict type safety.3.It provides code Access Security.4.It provides 

A. Only 1,3 and 4

B. Only 3,4

C. All of the above 

D. Only 2,3 and 4

7.What is the namespace which is the parent for all types in the .Net framework?

A System.Object

B System.Web

C System.IO

D System.File

8.Which of the following methods tells the garbage-collector not to call finalize?

A. GC.Collect(int)

B. GC.Dispose()

C. GC.Cancel()

D. GC.SuppressFinalize()

9.The code that runs under CLR is called _______?

A. Managed code

B. Unmanaged code

C. COM Code

D. PIN code

10.Which statement describes a Dipose method?

A.It defines an execution environment for program code and manages the CLR

B.It belongs to the IDiposable interface and is used to free resources,such as network connection and files 

C.It is partially method-compiled code library for use in deployment,versioning and security.

D.It is used for encapsulation of collections tield to functions of a class and object

11.Which of the following jobs are NOT performed by Garbage Collector?1.Freeing memory on the stack.2.Avioding memory leaks.3.Freeing memory occupied by unreferenced objects.4.Closing unclosed database collections.5.Closing unclosed

A.3,5

B.1,2,3

C.3,4

4.1,4,5

12. The code that targets the Common Language Runtime(CLR) is called _____?

A. Unmanaged

B. Distributed

C. Inheritance

D. Managed code

E. Native code

13.Which of the following assemblies can be stored in the Global Assembly Cache?

A Private Assemblies

B Friend Assemblies

C Shared Assemblies

D Public Assemblies

E Protected Assemblies

14.Which of the following is the root of the .NET type hierarchy?

A.System.Type

B.System.Object

C.System.Parent

D.System.Base

15.Which of the following is the .NET framework ?

A. ASP.NET Applications

B. .NET Framework class library

C. WinForm Applications

D. Windows Services

E. CLR

16.Which of the following statements correctly defines the .NET framework?

A. It is an environment for developing, creating, deploying and running desktop applications, web applications and web services.

B It is an environment for developing, building, deploying and running only Web applications.

C It is an environment for developing, creating, deploying and running distributed applications.

D It is an environment for developing, creating, deploying and running Web services.

E It is an environment for developing and running Windows applications.

17.Which of the following .NET components can be used to remove unused references from memory in the managed heap?

A. Common Language Infrastructure

B. Class Loader

C. Garbage Collector

D. CLR

E. CTS

18.Which of the following assemblies can be stored in Gloval Assembly Cache?

A.Friend Assemblies 

B. Private Assemblies

C. Public Assemblies

D. Shared Assemblies

19.Which of the following jobs are NOT performed by Garbage Collector?

A. Free up memory on the stack.

B. Avoid memory leaks.

C. Release of memory occupied by non-referenced objects.

D. Closing unclosed database collections.

E. Closing unclosed files.

20.What is a thread ?

A.A Single operation thaat does not return a value and that usually executes asynchronously 

B.the basic unit to which an operating system allocate processor time 

C.a series of related tasks or methods that together turn inputs into outputs 

D.a program that is running on your computer 

21.Which statement describes a Dispose method?

A. It defines an execution environment for program code and manages the CLR 

B. It belongs to the IDisposable interface and is used to free resources,such as network and files 

C. It is partially method-compiled code library for  use in deployment,versioning and security.

D. It is used for encapsulation of collections tied to functions of a class and object.

22.Which of the following .NET Framework components provide an extensible set of classes that can be used by any .NET compatible programming language?
A. .NET Framework class library

B. Common Language Runtime (CLR)

C. Common Language Infrastructure (CLI)

D. Component Object Model (COM)

E. Common Type System (CTS)

23.Can that targets the Common Language Runtime is known as 

A. Distributed 

B. Unmanaged 

C.Managed Code 

D. Legacy

24.Which of the following statements is correct about Managed Code?

A. Managed code is the code where resources are Garbage Collecte 

B. Managed code is the code that is compiled by the JIT compilers 

C. Managed code is the code that runs on top of Windows 

D.Managed code is the code that is written to target the services of the CLR.

25.Which of the following statements is correct about managed code?

A. The managed code is the code compiled by the JIT compilers.

B. Managed code is the code in which resources are fetched.

C. Managed code is code that runs on Windows.

D. Managed code is code written to target CLR services

E. Managed code is code that can be executed on Linux.


26.NET Framework Is An Internal _____ Component That Supports The Execution Of Applications Created By Using Various Programming Languages.

A. Internet

B. Windows

C. Hardware

D. language

27. Which Of The Following Provides Automatic Memory Management And Resolves The Issue Of Memory Leaks And Invalid Memory References

A. Security engine

B. Garbage collector

C. JIT compiler

D. Debugger

28.Application_start event in available in

A. Web.config

B. Local.asax

C. Global.asax

D. none of these

29. In ASP.net application DLL files are stored in _____ folder 

A. App_Data

B. App_Code

C. Bin

D.App_LocalResources

30.Which of the following method is used to dynamically register client script from code?

A. RegisterScript

B. Page.ClientScript

C. Page.ClientScript.RegisterClientScriptBlock

D. None of the above

31.Which of  the following session Mode Serialization is not required to store the data?

 A.InProc

B.SQLServer

C.StateServer

D. None of the above

32.In a SQL Statement while working with SqlCommand it returns a single value,at that time____ method of command Object will be used ?

A. ExecuteScalar

B. ExecuteReader

C. ExecuteNonQuery

D. None of the above

33.Which of the following is the first event of the ASP.NET page,when the user requests a web page ?
A. Init
B. Load
C. PreInit
D. PreLoad

34.How can we create a FileSystemObject in Asp.net?

A. Create("FileSystemObject")
B. Server.CreateObject("FileSystemObject")
C. Create Object:"Scripting.FileSystemObject"
D. Server.CreateObject("Scripting.FileSystemObject")

35. … is a code that consists of CPU and platform-independent set of instructions, which can be easily converted to native code.
A. JIT
B. FCL
C. DLL
D. MSIL

36.The … namespace includes classes and interfaces that return information about types, methods, and fields.
A. system
B. system.security
C. system.data
D. system.reflection

37. is an agreement among language designers and class library designers to use a common subset of basic language features that all languages have to follow.
A. Common Language Specifications (CLS)
B. Common Language Runtime (CLR)
C. Common Type System (CTS)
D. Framework Class Library (FCL)

38.… ensures complete interoperability among applications, regardless of the language used to create the application.
A) CLR
B) CLS
C) CTS
D) FCL

39.State whether the following statements about .NET Frameworks are TRUE or FALSE.
i) The .NET FCL is object-oriented.
ii) The CLR is the platform on which applications hosted and executed.
A. i-True, ii-False
B. i-False, ii-True
C. i-True, ii-True
D. i-False, ii-False

40.The … namespace includes classes that allow us to debug our application and to step through our code.
A. system.collection
B. system.security
C. system.diagnostics
D. system.threading

41.… will verify types used in the application with CTS or CLS standards supported by CLR.
A. Exception manager
B. Type checker
C. Code manager
D. Class loader


42.The main function of … is to convert the managed code into native code and then execute the code.

A) CLR
B) CTS
C) CLS
D) FCL  


43. The host for ASP.NET Core web application is configured in _________ file?

A. Program.cs
B. Startup.cs
C. Middleware
D. None of the above

44.Every command in .NET Core command line interface starts with _________

A. core
B. dotnet
C. .net
D. aspdotnet

45._____________ is not a member of ADODBCommand object

A. ExecuteReader
B. ExecuteStream
C. ExecuteScalar
D. Open

46.
What is the output of the code public  class B:A { }? 

A. Errors 
B. It defines a class that inherits the public methods of A only 
C. It defines a class that inherits all the methods  of A but the private members cannot be accessed 
D. Both b and c

47.Which of the following statements is correct about Managed Code? 

A. Managed code is the code that is compiled by the JIT compilers. 
B. Managed code is the code where resources are Garbage Collected. 
C. Managed code is the code that runs on top of Windows. 
D. Managed code is the code that is written to target the services of the CLR.

48.Which of the following .NET components  can be used to remove unused references from the managed heap? 

A. Common Language Infrastructure 
B. CLR 
C. Garbage Collector 
D. CTS               

49.ASP.NET separates the HTML output  from program logic using  a feature named as 

A. Exception 
B. Code-behind 
C. Code-front 
D. None of the above
 

50.The feature in  ASP.NET 2.0 that is used to fire a normal postback to a different  page in the application is called 

A. Theme 
B. Cross page posting 
C. Code-front 
D None of the above  

    

Question No Answers
1 C
2 D
3 D
4 A
5 B
6 C
7 A
8 D
9 A
10 B
11 D
12 D
13 C
14 B
15 A,B
16 A
17 C
18 D
19 A,D,E
20 A
21 B
22 A
23 C
24 D
25 D
26 B
27 B
28 C
29 C
30 C
31 A
32 A
33 C
34 D
35 D
36 D
37 A
38 B
39 C
40 C
41 B
42 A
43 A
44 B
45 D
46 C
47 D
48 C
49 B
50 B











Post a Comment

Previous Post Next Post