Implement a function that prints all possible combinations of the characters in a string
I can suggest following project for combinations and permutations which is very efficient and easy to use:

http://www.codeproject.com/Articles/26050/Permutations-Combinations-and-Variations-using-C-G

Then it's simple as:

IList&lt;Char&gt; chars = "abc".ToList();
List&lt;string&gt; allCombinations = new List&lt;String&gt;();
for (int i = 1; i &lt;= chars.Count; i++)
{ 
    var combis = new Facet.Combinatorics.Combinations&lt;Char&gt;(
        chars, i, Facet.Combinatorics.GenerateOption.WithRepetition);
    allCombinations.AddRange(combis.Select(c =&gt; string.Join("", c)));
}

foreach (var combi in allCombinations)
    Console.WriteLine(combi);


Output:

a
b
c
aa
ab
ac
bb
bc
cc
aaa
aab
aac
abb
abc
acc
bbb
bbc
bcc
ccc


If you don't want repetion you just have to change GenerateOption.WithRepetition to GenerateOption.WithoutRepetition and the result is:

a
b
c
ab
ac
bc
abc