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
ConsoleApp_Lesson3 Quiz
Answer all questions to test your understanding
1
What is the purpose of separating calculation logic into a separate class?
To follow the Single Responsibility Principle
To make the code run faster
To use more memory
To make the code more complex
2
Which exception is thrown when dividing by zero in C#?
NullReferenceException
DivideByZeroException
ArgumentException
IndexOutOfRangeException
3
What is the purpose of a while loop in the calculator application?
To keep the program running until the user exits
To make the program faster
To calculate multiple operations at once
To display the menu only once
4
Why should you use try-catch blocks in a calculator application?
To make the code run faster
To handle errors gracefully without crashing
To avoid writing validation code
To make the code more complex
Submit Quiz