text: Print reverse of a string using recursion | C # program to reverse a string using recursion ; Function to print reverse of the passed string ; Driver Code
code: using System ; class GFG { static void reverse ( String str ) { if ( ( str == null ) || ( str . Length <= 1 ) ) Console . Write ( str ) ; else { Console . Write ( str [ str . Length - 1 ] ) ; reverse ( str . Substring ( 0 , ( str . Length - 1 ) ) ) ; } } public static void Main ( ) { String str = " Geeks ▁ for ▁ Geeks " ; reverse ( str ) ; } }