Top 150+ Solved C# Programming MCQ Questions Answer
Q. Which of the following statements are TRUE about the .NET CLR? It provides a language-neutral development & execution environment. 2. It ensures that an application would not be able to access memory that it is not authorized to access. 3. It provides services to run "managed" applications. 4. The resources are garbage collected. 5. It provides services to run "unmanaged" applications.
a. Only 1 and 2
b. Only 1,2 and 4
c. 1,2,3,4
d. Only 4 and 5
Q. 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.
Q. 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
b. Common Language Runtime
c. Common Language Infrastructure
d. Component Object Model
Q. 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. Class Loader
Q. 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
b. It is an environment for developing, building, deploying and executing only Web Applications.
c. It is an environment for developing, building, deploying and executing Distributed Applications.
d. It is an environment for developing, building, deploying and executing Web Services.
Q. Which of the following assemblies can be stored in Global Assembly Cache?
a. Private Assemblies
b. Friend Assemblies
c. Shared Assemblies
d. Public Assemblies
Q. Code that targets the Common Language Runtime is known as
a. Unmanaged
b. Distributed
c. Legacy
d. Managed code
Q. Which of the following statements is correct about the .NET Framework?
a. NET Framework uses DCOM for achieving language interoperability.
b. NET Framework is built on the DCOM technology.
c. NET Framework uses DCOM for making transition between managed and unmanaged code.
d. NET Framework uses DCOM for creating unmanaged applications.
Q. Which of the following benefits do we get on running managed code under CLR? 1. Type safety of the code running under CLR is assured. 2. It is ensured that an application would not access the memory that it is not authorized to access. 3. It launches separate process for every application running under it. 4. The resources are Garbage collected.
a. Only 1 and 2
b. Only 2, 3 and 4
c. Only 1, 3 and 4
d. All of the above
Q. Which of the following jobs are done by Common Language Runtime? 1. It provides 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 Garbage Collection Services.
a. Only 1 and 2
b. Only 3 and 4
c. Only 1, 3 and 4
d. All of the above