Not getting the correct answer
Sharad, here, since the order is different from what you are getting right now, its better to use strings instead of char variable, as when you try to interchange the recursive calls, you wont be getting any output values, so in your print subsequence function, you can take two parameters, one as the original string, and the other as the empty string
void printsubsequences(string str,string osf)
then check that if the string length str is 0 or not, as given :
if(str.length()==0)
{
cout<<osf<<" ";
return;
}
otherwise :
char ch=str[0];
string ros=str.substr(1);
printsubsequences(ros,osf);
printsubsequences(ros,osf+ch);
Try to do using string only to get the correct order of printing.