A simple program to calculate combinations of a string using recursion, I have used a malloc string of size 100 , you can change it to whatever value you want. The author is currently working at Microsoft.
for eg if input string is abcd and you want all 3 letter combinations, the o/p would be
abc
abd
acd
bcd