CARVIEW |
C# Basics and Environment setup Quiz
Question 1
Which of the following is not an advantage of C#?
Automatic garbage collection
Cross-platform support via IL
Strongly typed language
No need for compilation after changes
Question 2
Which of the following is NOT a core concept of OOP in C#?
Abstraction
Encapsulation
Polymorphism
Compilation
Question 3
C# code is first compiled into:
Machine code
Intermediate Language (IL)
Bytecode
Assembly code
Question 4
What is the main role of the Common Language Runtime (CLR)?
Provides text editing tools
Translates IL into native machine code
Only runs programs on Windows
Removes semicolons from code
Question 5
Which operating system is required to install Visual Studio IDE for C#?
Windows 7 or higher
Windows 8 or higher
Windows 10 or higher
Any operating system
Question 6
Which project type should be chosen for a simple C# program in Visual Studio?
ASP.NET Core Web App
Console App (.NET Framework)
Windows Forms App
Class Library
Question 7
Which command verifies the installed .NET SDK version?
dotnet check
dotnet --version
dotnet run
dotnet build
Question 8
Which command creates a new console project in .NET?
dotnet create console <ProjectName>
dotnet new console -o <ProjectName>
dotnet console <ProjectName>
dotnet init console <ProjectName>
Question 9
What is the role of Program.cs in a .NET console project?
It stores database configuration
It is used only for UI design
It contains the Main method (entry point)
It sets up networking
Question 10
Before installing the .NET SDK on Ubuntu, what must be done first?
Install Java SDK
Install Visual Studio Code
Run dotnet build
Add Microsoft’s repository and update packages
There are 10 questions to complete.