C program to find all combinations of a string

C program to find all combinations of a string

Output:

Enter the string to find all its combinations: abcd
All combinations of string 'abcd' are:

abcd
bcd
acd
cd
abd
bd
ad
d
abc
bc
ac
c
ab
b
a


Implementation: