C# MCQ – Multiple Choice Questions with Answers – Part 3
Multiple choice questions and answers (MCQs) on C# to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as Variables, Operators, Conditional Statement, Functions, and more. This quiz will easily prepare anyone to pass their online test.
1. Which can be used to compile managed assemblies into native processor-specific code?
A gacutil
B ngen
C sn
D dumpbin
E ildasm
2. 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.
3. Which of the following statements are NOT true about the .NET Framework ?
A It provides a consistent object-oriented programming environment, whether the object code is stored and executed locally, but distributed over the Internet or executed remotely.
B It provides a code execution environment that minimizes software deployment and version conflicts.
C It provides a code execution environment that promotes secure execution of code, including code created by an unknown or semi-reliable third party.
D It provides different programming models for Windows and Web applications.
E It provides an event-driven programming model for building Windows device drivers.
4. 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)
5. 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.
6. 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
7. 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.
8. 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
9. 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
10. The code that targets the Common Language Runtime(CLR) is called _____?
A Unmanaged
B Distributed
C Inheritance
D Managed code
E Native code