Q1
Q1 What is the primary purpose of the .NET Framework?
To provide tools for building mobile apps
To build web apps only
To develop Windows apps in multiple languages
To design animations
Q2
Q2 Which of these is a component of the .NET Framework?
Common Language Runtime (CLR)
Java Runtime Environment
Python Interpreter
Linux Kernel
Q3
Q3 What is MSIL in the context of .NET?
Machine-Specific Intermediate Language
Managed Source Intermediate Language
Microsoft Intermediate Language
Microsoft Secure Intermediate Language
Q4
Q4 Which programming languages are supported by the .NET Framework?
Only C++
Java and C#
C#, VB.NET, F#
JavaScript and Python
Q5
Q5 What does the .exe file represent in a .NET application?
Source code file
Executable file
Assembly cache
Code library
Q6
Q6 Which of the following describes the .NET Framework Class Library?
A runtime environment
A collection of reusable classes
A file manager
A code editor
Q7
Q7 Which framework version introduced .NET Core as cross-platform?
.NET 3.5
.NET 4.0
.NET 5
.NET Core
Q8
Q8 Which tool can be used to compile .NET applications?
JDK
MSBuild
Node.js
PHP
Q9
Q9 Which method displays text on the console in C#?
Console.Display()
Console.Output()
Console.WriteLine()
Console.Print()
Q10
Q10 A developer encounters a "FileNotFoundException" in .NET. What is the likely issue?
File is corrupted
Incorrect file path
Incorrect framework version
Database is down
Q11
Q11 What is the main function of the Common Language Runtime (CLR) in .NET?
Manages app updates
Executes code and manages memory
Controls database access
Designs UI
Q12
Q12 What is the purpose of the Common Type System (CTS) in .NET?
Defines types for cross-language compatibility
Handles memory allocation
Sets up permissions
Compiles code
Q13
Q13 Which component of .NET is responsible for garbage collection?
Framework Class Library
Common Language Runtime
Global Assembly Cache
Intermediate Language Compiler
Q14
Q14 Which .NET component compiles managed code into native code?
Intermediate Language Compiler
Common Type System
JIT Compiler
Framework Library
Q15
Q15 What is the purpose of the .NET Framework Class Library (FCL)?
Executes code
Manages user access
Provides reusable classes
Compiles programs
Q16
Q16 Which .NET feature allows multiple languages to be used in a single application?
Cross-Platform Support
Interoperability
Common Language Specification
Multi-Threading
Q17
Q17 What does the Global Assembly Cache (GAC) do in .NET?
Manages memory
Stores temporary files
Hosts shared assemblies
Compiles code
Q18
Q18 Which code snippet demonstrates defining an integer variable in C#?
int number = 10;
number = 10;
int number
number = 10
Q19
Q19 Which command can be used to add an assembly to the Global Assembly Cache (GAC) in .NET?
gacutil -i assembly
install -gac assembly
gac -add assembly
addgac assembly
Q20
Q20 A developer encounters a "Type Mismatch" error. What is the likely cause?
Incorrect type declaration
Syntax error
File path issue
Invalid characters
Q21
Q21 An application fails due to a missing assembly. What is a possible solution?
Rebuild the project
Reinstall the GAC
Recompile the assembly
Check system path
Q22
Q22 What is the main purpose of the Common Language Runtime (CLR) in .NET?
To compile Java code
To provide debugging features
To manage program execution
To replace the OS
Q23
Q23 Which part of the CLR is responsible for memory management?
Common Type System
JIT Compiler
Garbage Collector
Global Assembly Cache
Q24
Q24 Which type of code does the CLR execute?
Managed code
Machine code
Assembly code
Source code
Q25
Q25 What is the purpose of the Just-In-Time (JIT) compiler in CLR?
To manage memory
To interpret code
To convert MSIL to machine code
To secure the OS
Q26
Q26 Which CLR feature ensures that objects are automatically deleted when they are no longer referenced?
JIT Compilation
Garbage Collection
Exception Handling
Threading
Q27
Q27 Which process in the CLR allows code to be verified for type safety before execution?
Code Access Security
Garbage Collection
Code Verification
Just-In-Time Compilation
Q28
Q28 How do you force garbage collection in a .NET application?
GC.Run()
Garbage.Collect()
System.GC()
CLR.Collect()
Q29
Q29 Which method would you use to determine the generation of an object in .NET?
GC.GetGeneration(object)
GC.Collect()
GC.Generation()
GC.GetGen(object)
Q30
Q30 A developer encounters an "OutOfMemoryException." What could be a likely cause?
File not found
Corrupt CLR
Too many objects in memory
Invalid file path