Reverse the string "Toolliyo" and print result.
Ready — edit the code above and click Run.
using System;
class Program
{
static void Main()
{
string s = "Toolliyo";
char[] chars = s.ToCharArray();
Array.Reverse(chars);
Console.WriteLine(new string(chars));
}
}
Try solving on your own first, then reveal the official answer.
Convert to char array, reverse, rebuild string. Alternative: StringBuilder from end to start.