Please use copy-and-paste to quote code, so you don't get misprints like "Public." Please tell us what you think the recursion should do and what it is actually doing. It is doing exactly what you have told it to do. Please work out how you are supposed to get "ab" from "abcd" which is where you are having problems.
I think you have to take another look at your algorithm. You want to display substrings, but you don't manipulate your input string at all (except for making it longer by adding numbers at the end). How do you want to get from "abcd" to "cd"?
Joined: Feb 01, 2008
you are right
is there any code that prints the subsets of the string??