1.
Which of the CLR component allows .net application exchange data with COM application?
Correct Answer
B. COM marshaller
Explanation
The COM marshaller is the CLR component that allows .NET applications to exchange data with COM applications. It provides the necessary interop services to bridge the gap between the two different technologies, enabling seamless communication and data exchange between them. The COM marshaller handles the conversion of data types, manages memory allocation, and ensures proper communication protocols are followed, making it possible for .NET and COM applications to work together effectively.
2.
Which of the following is not true for garbage collection?
Correct Answer
D. It disposes unreferenced objects
Explanation
Garbage collection is a process that manages the reclamation of unused memory and deals with circular references. It automatically identifies and frees up memory occupied by objects that are no longer referenced by the program. However, it is not possible to determine exactly when an object will be reclaimed by the garbage collector. Therefore, the statement "You can be certain when an object will be reclaimed by the garbage collector" is not true.
3.
Which of the following does the actual .Net code execute?
Correct Answer
B. MSIL
Explanation
MSIL (Microsoft Intermediate Language) is the correct answer. When .Net code is compiled, it is converted into MSIL, which is a low-level, platform-independent language. MSIL code is then executed by the Common Language Runtime (CLR), which is responsible for translating the MSIL into machine code that can be understood by the specific computer architecture. Therefore, the actual .Net code executes in the form of MSIL. CLS (Common Language Specification) and CTS (Common Type System) are specifications that ensure interoperability between different .Net languages and data types, while CLR is the runtime environment that manages memory, security, and other runtime services.
4.
Which of the CLR component allows converting MSIL into operating system native code?
Correct Answer
B. JIT compiler
Explanation
The correct answer is JIT compiler. The JIT (Just-In-Time) compiler is a component of the CLR (Common Language Runtime) that converts MSIL (Microsoft Intermediate Language) into operating system native code at runtime. This allows the code to be executed directly by the CPU, improving performance. The JIT compiler compiles the MSIL code on-demand, as it is needed, and stores the resulting native code in memory for future use. This process is known as Just-In-Time compilation because it occurs just before the code is executed.
5.
When does garbage collector run?
Correct Answer
B. When application is running low of memory
Explanation
The garbage collector runs when the application is running low on memory. This is because the garbage collector's main purpose is to free up memory by removing objects that are no longer in use by the application. When the application is running low on memory, the garbage collector is triggered to identify and remove these unused objects, freeing up memory for the application to use. This helps to prevent memory leaks and ensure efficient memory management within the application.
6.
Which of the following statement is not correct?
Correct Answer
D. .Net provides cross language interoperability using code access security
Explanation
The given statement " .Net provides cross language interoperability using code access security" is not correct because .NET provides cross language interoperability through the Common Language Runtime (CLR), not through code access security. Code access security is a feature of the .NET framework that helps protect resources and enforce security policies, but it is not directly related to cross language interoperability.
7.
Limitation of XML serialization
Correct Answer
A. It doesn’t serialize type information
Explanation
XML serialization is a process of converting objects into XML format for storage or transmission. One limitation of XML serialization is that it doesn't serialize type information. This means that when an object is serialized into XML, the resulting XML document does not include any information about the type of the object. This can be a limitation in scenarios where the type of the object needs to be known during deserialization.
8.
What are the configuration files used by the .NET Framework?
Correct Answer
D. All of the above
Explanation
The .NET Framework uses multiple configuration files for different purposes. The Machine.config file is a global configuration file that contains settings for the entire machine. The Application configuration file is specific to each application and contains settings that are specific to that application. The Security configuration file is used to configure security settings for the .NET Framework. Therefore, all of the given options are correct as they represent the different configuration files used by the .NET Framework.
9.
Which of the following is the tool to modify configuration files?
Correct Answer
D. A and b
Explanation
The correct answer is "a and b" because both Mscorcfg.msc and Caspol.exe are tools that can be used to modify configuration files. Mscorcfg.msc is a tool used to configure .NET Framework security policy settings, while Caspol.exe is a command-line tool used to configure security policy for the .NET Framework. Therefore, using either of these tools can allow for modifications to be made to configuration files.
10.
What are the facilities is not provide by CLR?
Correct Answer
D. Compiler management
Explanation
The facilities provided by CLR include memory management, thread management, and exception handling. However, CLR does not provide compiler management. Compiler management is the responsibility of the programming language or development environment used to write the code, not the CLR.