22. What does the 'default' keyword do in a 'switch' statement in C#?
23. In C#, what is the syntax for a 'for-each' loop?
24. What is the result of the expression 10 == 10 in C#?
25. Which loop in C# is more appropriate for iterating through an array?
26. What is the purpose of the 'continue' statement in a loop in C#?
27. In C#, what is the result of the expression 5 >= 5?
28. Which control flow statement in C# is used to handle multiple conditions using a single switch expression?
29. What is the result of the expression 12 < 5 ? "Yes" : "No" in C#?
30. What will be the output of the following C# code?
static void Main(string[] args)
{
int x = 0;
do
{
x++;
if (x == 5)
{
x++;
continue;
break;
}
Console.WriteLine(x + " ");
}
}while (x < 10);
static void Main(string[] args)
{
int x = 0;
do
{
x++;
if (x == 5)
{
x++;
continue;
break;
}
Console.WriteLine(x + " ");
}
}while (x < 10);