Concatenate suffixes of a String | C # Implementation of the above approach ; Function to print the expansion of the string ; Take sub - string from i to n - 1 ; Print the sub - string ; Driver code
using System ; class GFG { static void printExpansion ( String str ) { String suff = " " ; for ( int i = str . Length - 1 ; i >= 0 ; i -- ) { suff = suff + str [ i ] ; Console . Write ( suff ) ; } } public static void Main ( String [ ] args ) { String str = " geeks " ; printExpansion ( str ) ; } }