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();
}
}
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
Join The Discussion