Predict the output

Predict the output of the following code snippet.

string sentence = "Good    Morning World";
string[] words = sentence.Split(' ');

foreach (var word in words)
{
    System.Console.WriteLine($"<{word}>");
}
Options

1.<Good>

<>

<>

<>

<Morning>

<World>

2.

<Good>

<Morning>

<World>

3.

<Good>

<>

<Morning>

<World>

4.None of these

Previous PostNext Post

Related Posts

Close Bitnami banner
Bitnami