display reverse string without using any function

Gow.Net
Posted by Gow.Net under C# category on | Points: 40 | Views : 2735
string str = "gowthaman";
int len = str.Length;
char[] arr = new char[len];

for (int i = 0; i < len; i++)
{
arr[i] = str[len - 1 - i];
Console.Write(arr[i]);

}

Comments or Responses

Login to post response