C# Mastery Hub
Home
Challenges
Discussion
Lessons
Core Topics
C# Fundamentals
Console Applications
Classes & OOP
Windows Forms
ASP.NET Core
SQL Server
VS & SQL Connection
RDLC Reports
.NET MAUI
Getting Started
Getting Started
Website Development
SEO Guide
Security
Project Workflow
Extra Topics
Cloud & Deployment
AWS Cloud
Deployment
About
Contact
Test Your Knowledge
C# Fundamentals - Lesson 3: Variables and Data Types Quiz
Answer all questions to test your understanding
1
Which data type is used for whole numbers in C#?
double
decimal
int
float
2
What is the range of the int data type in C#?
-128 to 127
-32,768 to 32,767
-2,147,483,648 to 2,147,483,647
0 to 4,294,967,295
3
Which data type is best for precise decimal calculations like money?
double
float
decimal
int
4
What does the 'var' keyword do in C#?
Creates a variable without a type
Implicitly types a variable based on the value
Makes a variable constant
Creates a global variable
5
What is a nullable type in C#?
A type that can be null
A type that cannot be null
A type that is always optional
A type with a default value of null
Submit Quiz