C#.NET objective type questions and answers

1. Which of the following statements are (True) about the .NET CLR?
a. It provides a language-neutral development & execution environment. (True)
b. It ensures that an application would not be able to access memory that it is not authorized to access. (True)
c. It provides services to run "managed" applications. (True)
d. The resources are garbage collected. (True)
e. It provides services to run "unmanaged" applications. (False!)
Correct answers: a, b, c, d
Not answered
2. Which of the following statements is correct about Managed Code?
a. Managed code is the code that is compiled by the JIT compilers. (False!)
b. Managed code is the code where resources are Garbage Collected. (False!)
c. Managed code is the code that runs on top of Windows. (False!)
d. Managed code is the code that is written to target the services of the CLR. (True)
e. Managed code is the code that can run on top of Linux. (False!)
Correct answers: d
Not answered
3. Which of the following are not true about .NET Framework?
a. It provides a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. (False!)
b. It provides a code-execution environment that minimizes software deployment and versioning conflicts. (False!)
c. It provides a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party. (False!)
d. It provides different programming models for Windows-based applications and Web-based applications. (True)
e. It provides an event driven programming model for building Windows Device Drivers. (True)
Correct answers: d, e
Not answered
4. Which of the following jobs are NOT performed by Garbage Collector?
a. Freeing memory on the stack. (True)
b. Avoiding memory leaks. (False!)
c. Freeing memory occupied by unreferenced objects. (False!)
d. Closing unclosed database collections. (True)
e. Closing unclosed files. (True)
Correct answers: a, d, e
Not answered
5. Which of the following statements correctly define .NET Framework?
a. It is an environment for developing, building, deploying and executing Desktop Applications, Web Applications and Web Services. (True)
b. It is an environment for developing, building, deploying and executing only Web Applications. (False!)
c. It is an environment for developing, building, deploying and executing Distributed Applications. (False!)
d. It is an environment for developing, building, deploying and executing Web Services. (False!)
e. It is an environment for development and execution of Windows applications. (False!)
Correct answers: a
Not answered
6. Which of the following assemblies can be stored in Global Assembly Cache?
a. Private Assemblies (False!)
b. Friend Assemblies (False!)
c. Shared Assemblies (True)
d. Public Assemblies (False!)
e. Protected Assemblies (False!)
Correct answers: c
Not answered
7. Which of the following statements is correct about the .NET Framework?
a. .NET Framework uses DCOM for achieving language interoperability. (False!)
b. .NET Framework is built on the DCOM technology. (False!)
c. .NET Framework uses DCOM for making transition between managed and unmanaged code. (True)
d. .NET Framework uses DCOM for creating unmanaged applications. (False!)
e. .NET Framework uses COM+ services while creating Distributed Applications. (False!)
Correct answers: c
Not answered
8. Which of the following benefits do we get on running managed code under CLR?
a. Type safety of the code running under CLR is assured. (True)
b. It is ensured that an application would not access the memory that it is not authorized to access. (True)
c. It launches separate process for every application running under it. (True)
d. The resources are Garbage collected. (True)
Correct answers: a, b, c, d
Not answered
9. Which of the following jobs are done by Common Language Runtime?
a. It provides core services such as memory management, thread management, and remoting. (True)
b. It enforces strict type safety. (True)
c. It provides Code Access Security. (True)
d. It provides Garbage Collection Services. (True)
Correct answers: a, b, c, d
Not answered
10. Which of the following statements are correct about JIT?
a. JIT compiler compiles instructions into machine code at run time. (True)
b. The code compiler by the JIT compiler runs under CLR. (True)
c. The instructions compiled by JIT compilers are written in native code. (True)
d. The instructions compiled by JIT compilers are written in Intermediate Language (IL) code. (False!)
e. The method is JIT compiled even if it is not called (False!)
Correct answers: a, b, c
Not answered
11. Which of the following are parts of the .NET Framework?
a. The Common Language Runtime (CLR) (True)
b. The Framework Class Libraries (FCL) (True)
c. Microsoft Published Web Services (False!)
d. Applications deployed on IIS (False!)
e. Mobile Applications (False!)
Correct answers: a, b
Not answered
12. Which of the following statements are correct about a .NET Assembly?
a. It is the smallest deployable unit. (True)
b. Each assembly has only one entry point - Main(), WinMain() or DLLMain() (True)
c. An assembly can be a Shared assembly or a Private assembly. (True)
d. An assembly can contain only code and data. (False!)
e. An assembly is always in the form of an EXE file. (False!)
Correct answers: a, b, c
Not answered
13. Which of the following security features can .NET applications avail?
a. PIN Security (False!)
b. Code Access Security (True)
c. Role Based Security (True)
d. Authentication Security (False!)
e. Biorhythm Security (False!)
Correct answers: b, c
Not answered
14. Which of the following is the root of the .NET type hierarchy?
a. System.Object (True)
b. System.Type (False!)
c. System.Base (False!)
d. System.Parent (False!)
e. System.Root (False!)
Correct answers: a
Not answered
15. Code that targets the Common Language Runtime is known as
a. Unmanaged (False!)
b. Distributed (False!)
c. Legacy (False!)
d. Managed Code (True)
e. Native Code (False!)
Correct answers: d
Not answered
16. Which of the following constitutes the .NET Framework?
a. ASP.NET Applications (False!)
b. CLR (True)
c. Framework Class Library (True)
d. WinForm Applications (False!)
e. Windows Services (False!)
Correct answers: b, c
Not answered
17. Which of the following .NET components can be used to remove unused references from the managed heap?
a. Common Language Infrastructure (False!)
b. CLR (False!)
c. Garbage Collector (True)
d. Class Loader (False!)
e. CTS (False!)
Correct answers: c
Not answered
18. Which of the following components of the .NET framework provide an extensible set of classes that can be used by any .NET compliant programming language?
a. .NET class libraries (True)
b. Common Language Runtime (False!)
c. Common Language Infrastructure (False!)
d. Component Object Model (False!)
e. Common Type System (False!)
Correct answers: a
Not answered
19. Which of the following are valid .NET CLR JIT performance counters?
a. Total memory used for JIT compilation (False!)
b. Average memory used for JIT compilation (False!)
c. Number of methods that failed to compile with the standard JIT (True)
d. Percentage of processor time spent performing JIT compilation (True)
e. Percentage of memory currently dedicated for JIT compilation (False!)
Correct answers: c, d
Not answered
20. Which of the following utilities can be used to compile managed assemblies into processor-specific native code?
a. gacutil (False!)
b. ngen (True)
c. sn (False!)
d. dumpbin (False!)
e. ildasm (False!)
Correct answers: b
Not answered
   
Today's date:
Total spent time:
Total answered question:
Total unanswered question:





4 comments:

  1. Thank you so much for sharing a very useful questions.

    ReplyDelete
  2. It's very useful and good start to test C# skills and improve it.Thanks for sharing.

    ReplyDelete