plz tell me why all the test cases has failed.
#include
using namespace std;
int count = 0;
void subsequence(char *in,char *out,int i,int j)
{
if(in[i]==’\0’)
{
out[j]=’\0’;
cout<<out<<" ";
count++;
return;
}
out[j]=in[i];
subsequence(in,out,i+1,j+1);
subsequence(in,out,i+1,j);
return;
}
int main()
{
char input[10000];
cin>>input;
char output[10000];
subsequence(input,output,0,0);
cout<<count;
}