C# MasterClass

Quiz 1: Output & Syntax

1. Which command prints text to a new line?

2. Every C# statement must end with:

3. C# is case-sensitive (Main is different from main).

Quiz 2: Input Data

1. Console.ReadLine() returns which data type?

2. To convert a String "5" to an Integer, use:

3. What happens if you try to do math on a string?

Quiz 3: Operators

1. What is the result of 10 % 3?

2. Which operator calculates multiplication?

3. x++ increases the value of x by:

Quiz 4: Conditions

1. Which keyword catches anything not caught by 'if'?

2. Which operator means "Equal to"?

3. Logical operator for OR is:

Quiz 5: Loops

1. Which loop is best when iteration count is known?

2. Which loop runs as long as a condition is true?

3. An infinite loop is a loop that never stops.

Quiz 6: Arrays

1. Array indexes start with:

2. How to access the first element of array 'cars'?

3. Which property finds the size of an array?

Quiz 7: Switch Statement

1. Which keyword stops the execution inside a case?

2. Which keyword runs if no match is found?

3. Switch statements are often cleaner than many if-else blocks.

Quiz 8: Methods

1. A method that returns no value uses which keyword?

2. Variables passed into a method are called:

3. Which keyword is used to send a value back?