Examveda

What will be the output of the following C# code snippet?
class Program
{
    static void Main(string[] args)
    {
        String c = "  Hello World  ";
        String s = c.Trim();
        Console.WriteLine("""+s+""");
        Console.ReadLine();
    }
}

A. " Hello World "

B. "HelloWorld"

C. "Hello World"

D. "Hello"

Answer: Option C


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

Join The Discussion

Related Questions on Miscellaneous in C Sharp