June 14, 2024·2 min read C# Test nr.1 CodingTestsC# C# Beginner's Test Time Elapsed: 0 seconds 1. What is the output of the following code? ```csharp using System; public class Program { public static void Main(string[] args) { Console.WriteLine(5 + 3 * 2); } } ``` a) 16 b) 13 c) 11 d) 10 2. Which keyword is used to define a constant in C#? a) let b) const c) readonly d) static 3. How do you declare a method in C#? a) function MyMethod() {} b) void MyMethod() {} c) def MyMethod() {} d) function MyMethod {} 4. What is the output of the following code? ```csharp using System; public class Program { public static void Main(string[] args) { int x = 5; int y = 10; Console.WriteLine(x == y); } } ``` a) True b) False c) x d) y 5. How do you create an array in C# with the elements 1, 2, and 3? 6. Explain the difference between ArrayList and List in C#. 7. Write a C# expression to check if the string "hello" contains the substring "ell". 8. What is the purpose of the async and await keywords in C#?