C# Exam October #1

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Kuskus
K
Kuskus
Community Contributor
Quizzes Created: 2 | Total Attempts: 628
Questions: 10 | Attempts: 269

SettingsSettingsSettings
C# Exam October #1 - Quiz

C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented, and component-oriented programming disciplines. Are you looking for practice questions and answers for the Microsoft Programming in the C# exam? Give the test below a try and see how prepared you are. All the best as you tackle it!


Questions and Answers
  • 1. 

    Which of the CLR component allows .net application exchange data with COM application?

    • A.

      Base class library

    • B.

      COM marshaller

    • C.

      Class loader

    • D.

      Thread support

    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.

    Rate this question:

  • 2. 

    Which of the following is not true for garbage collection?

    • A.

      It manages the reclamation of unused memory

    • B.

      It deals with circular references

    • C.

      You can be certain when an object will be reclaimed by garbage collector

    • D.

      It disposes unreferenced objects

    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.

    Rate this question:

  • 3. 

    Which of the following does the actual .Net code execute?

    • A.

      CLS

    • B.

      MSIL

    • C.

      CTS

    • D.

      CLR

    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.

    Rate this question:

  • 4. 

    Which of the CLR component allows converting MSIL into operating system native code?

    • A.

      Native compiler

    • B.

      JIT compiler

    • C.

      Runtime compiler

    • D.

      None of above

    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.

    Rate this question:

  • 5. 

    When does garbage collector run?

    • A.

      Every one minute

    • B.

      When application is running low of memory

    • C.

      It runs randomly

    • D.

      When application closed

    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.

    Rate this question:

  • 6. 

    Which of the following statement is not correct?

    • A.

      CLR is an execution engine of .NET

    • B.

      Assembly is a logical unit of deployment

    • C.

      CLR executes manage code

    • D.

      .Net provides cross language interoperability using code access security

    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.

    Rate this question:

  • 7. 

    Limitation of XML serialization

    • A.

      It doesn’t serialize type information

    • B.

      It can't serialize DataSet objects

    • C.

      It can’t serialize XMLNode object

    • D.

      All of the above

    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.

    Rate this question:

  • 8. 

    What are the configuration files used by the .NET Framework?

    • A.

      Machine configuration, Machine.config file

    • B.

      Application configuration file

    • C.

      Security configuration file

    • D.

      All of the above

    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.

    Rate this question:

  • 9. 

    Which of the following is the tool to modify configuration files?

    • A.

      Mscorcfg.msc

    • B.

      Caspol.exe

    • C.

      IIASM.exe

    • D.

      A and b

    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.

    Rate this question:

  • 10. 

    What are the facilities is not provide by CLR?

    • A.

      Memory management

    • B.

      Thread management

    • C.

      Exception handling

    • D.

      Compiler management

    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.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 31, 2014
    Quiz Created by
    Kuskus
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.