What Will Be The Output Of The Following C Codep Pre Langcsharp #50
What will be the output of the following C# code?</p> <pre><code class="language-csharp" line="1"> static void Main(string[] args) { string Name = "He is playing in a ground."; char[] characters = Name.ToCharArray(); StringBuilder sb = new StringBuilder(); for (int i = Name.Length - 1; i >= 0; --i) { sb.Append(characters[i]); } Console.Write(sb.ToString()); Console.ReadLine(); } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Data Types, Variables and Operators - Initialization of Variables - Quiz No.1.
What will be the output of the following C# code?
static void Main(string[] args) { string Name = "He is playing in a ground."; char[] characters = Name.ToCharArray(); StringBuilder sb = new StringBuilder(); for (int i = Name.Length - 1; i >= 0; --i) { sb.Append(characters[i]); } Console.Write(sb.ToString()); Console.ReadLine(); }
He is playing in a grou
.ground a in playing is He
.dnuorg a ni gniyalp si eH
He playing a