Examveda

What will be the output of given code snippet?
class Program
{
    static void Main(string[] args)
    {
        char []chars = {'a', 'b', 'c'};
        String s = new String(chars);
        String s1 = "abcd";
        int len1 = s1.Length;
        int len2 = s.Length;
        Console.WriteLine(len1 + " " + len2);
        Console.ReadLine();
    }
}

A. 4 0

B. 3 0

C. 3 4

D. 4 3

Answer: Option D


This Question Belongs to C Sharp Programming >> Miscellaneous In C Sharp

Join The Discussion

Related Questions on Miscellaneous in C Sharp