Arrays And Strings In C Sharp - Study Mode

[#86] What will be the output of the following C# code? static void Main(string[] args)
{
String c = "Hello"
String a = c + "Bye"
Console.WriteLine(a)
Console.ReadLine()
}
Correct Answer

(D) HelloBye

[#87] What will be the output of the following C# code? static void Main(string[] args)
{
char A = 'K'
char B = Convert.ToChar(76)
A++
B++
Console.WriteLine(A+ " " +B)
Console.ReadLine()
}
Correct Answer

(C) L M

[#88] What is the result of the following code in C#: string[] fruits = {"Apple", "Banana", "Orange"}
Console.WriteLine(fruits[1])
Correct Answer

(D) Banana

[#89] What is the correct way to declare and initialize a jagged array in C#?
Correct Answer

(A) int[][] jaggedArray = new int[3][]

[#90] What is the correct syntax to initialize an array in C#?
Correct Answer

(C) int[] numbers = new int[5]