Quiz Yourself: C# Basics
Check your understanding of C# case sensitivity, syntax rules, type casting, and control flow structures.
We'll cover the following...
We'll cover the following...
C# Basics Quiz
1.
Analyze the following code snippet. What is the precise output when RunCheck() is called?
static void RunCheck()
{
CheckNumber(10);
CheckNumber(2);
}
static void CheckNumber(int num)
{
if (num > 5)
{
return;
}
Console.Write(num + " ");
}
A.
10 2
B.
2
C.
10
D.
Runtime error
1 / 14