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);

  }
}
  1. 5
  2. 6
  3. 7
  4. 4

Answer: A) 5

Explanation:

The String.Length returns the length of the string. Thus, the output will be 5.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.