S

Shivam • 8.86K Points
Tutor III

Q. What will be the output of the following C# code?

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(); 
 }
  • (A) He is playing in a grou
  • (B) .ground a in playing is He
  • (C) .dnuorg a ni gniyalp si eH
  • (D) He playing a
  • Correct Answer - Option(C)
  • Views: 141
  • Filed under category C#

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics