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_Lesson2 Quiz
Answer all questions to test your understanding
1
What is the difference between Console.Write() and Console.WriteLine()?
Write() adds a new line, WriteLine() doesn't
WriteLine() adds a new line, Write() doesn't
They do the same thing
Write() only works with numbers
2
Which method is used to read user input from the console?
Console.Read()
Console.ReadLine()
Console.ReadKey()
All of the above
3
What is string interpolation in C#?
A way to concatenate strings using +
A way to embed expressions inside strings using $
A method to replace characters
A way to split strings
4
Which method should you use to safely convert a string to an integer?
int.Parse()
Convert.ToInt32()
int.TryParse()
All of the above are equally safe
5
How do you change the text color in a console application?
Console.Color = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.Red;
Console.TextColor = ConsoleColor.Red;
Console.SetColor(ConsoleColor.Red);
Submit Quiz