Home »
MCQs »
C# MCQs
What will be the output of the following C# code? | Question 13
59. What will be the output of the following C# code?
using System;
class Program {
static void Main(string[] args) {
String str = "Hello";
Console.WriteLine(str.Length);
}
}
- 5
- 6
- 7
- 4
Answer: A) 5
Explanation:
The String.Length returns the length of the string. Thus, the output will be 5.