Tuesday, September 23.
  • Top Posts

    C# program to reverse a string

    ad728

    • This program is used to learn,how to reverse the given string using Recursion and Iteration.

     class ReverseString  
       {  
         public static string Reverse(string x)  
         {  
           string result = "";  
           for (int i = x.Length - 1; i >= 0; i--)  
             result += x[i];  
           return result;  
         }  
       }<br />
    
    25

    No comments

    Post Top Ad

    Post Bottom Ad