C# MCQ – Multiple Choice Questions with Answers – Part 4
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 of the following is the root of the hierarchy of all .NET types?
A System.Object
B System.Type
C System.Base
D System.Parent
E System.Root
2. Which of the following statements is correct about the .NET Framework?
A .NET Framework uses DCOM to ensure language interoperability.
B NET Framework is based on DCOM technology.
C NET Framework uses DCOM to make the transition between managed and unmanaged code.
D NET Framework uses DCOM to create unmanaged applications.
E .NET Framework uses COM+ services when creating distributed applications.
3. Which of the following are advantages of managed code under CLR?
A The security type of the code executed under CLR is assured.
B It is guaranteed that an application will not access memory that it is not authorized to access.
C It starts a separate process for each application running under it.
D Resources are recovered.
E All the answers are true
4. Which of the following security features can be used by .NET applications?
A PIN Security
B Code access security
C Role-based security
D Authentication security
E Biorhythm Safety
5. Which of the following jobs are performed by Common Language Runtime?
A It provides basic services such as memory management, thread management and remote communication.
B It uses a strict security type.
C It provides security access to the code.
D It provides Garbage Collection services.
E All the answers are true
6. Which of the following statements is correct about .NET assembly?
A It is the smallest deployable unit.
B Each assembly has only one entry point – Main(), WinMain() or DLLMain().
C An assembly can be a shared assembly or a private assembly.
D An assembly can only contain code and data.
E An assembly is always presented as an EXE file.
7. What are the types of JIT?
A Pre-JIT
B Econo-JT
C Normal-JIT
D All the answers are true
8. Garbage collector (GC) includes _______ generations.
A One
B Two
C Three
D Five
9. Which of the following statements are correct about JIT?
A The JIT compiler compiles the instructions into machine code at runtime.
B The code compiled by the JIT compiler runs under CLR.
C Instructions compiled by JIT compilers are written in native code.
D Instructions compiled by JIT compilers are written in IL (Intermediate Language) code.
10. Which of the following belong to the .NET framework ?
A Common Language Runtime (CLR)
B Framework Class Libraries (FCL)
C Microsoft Published Web Services
D Applications deployed on IIS
E Mobile applications