Which code fragment will display "Hello, World"?

You want to substitute values in a string that is displayed on the console. Which code fragment will
display “Hello, World”?

You want to substitute values in a string that is displayed on the console. Which code fragment will
display “Hello, World”?

A.
Console.WriteLine(“Hello, {0}”, “World”);

B.
Console.WriteLine(“Hello, (0)”, “World”);

C.
Console.WriteLine(“Hello, <0>”, “World”);

D.
Console.WriteLine(“Hello, [0]”, “World”);



Leave a Reply 2

Your email address will not be published. Required fields are marked *