Examveda

What will be the output of the following C# code snippet?
static void main(String args[])
{
    char chars[] = {'x', 'y', 'z'};
    String s = new String(chars);
    Console.WriteLine(s);
}

A. x

B. xy

C. z

D. xyz

Answer: Option D


Join The Discussion

Related Questions on Arrays and Strings in C Sharp