• Top Posts

    C# program to reverse a string


    • This program is used to learn,how to reverse the given string using recursion and Iteration.
     class Reverse-string  
       {  
         public static string Reverse(string x)  
         {  
           string result = "";  
           for (int i = x.Length - 1; i >= 0; i--)  
             result += x[i];  
           return result;  
         }  
       }<br />

    No comments

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728