Subsequences recursion

what is wrong in my code

#include
using namespace std;

void subsequences(char *a,char *out,int i, int j){
if(a[i]==’\0’){
out[j]=’\0’;
cout<<out<<endl;
return;
}
subsequences(a,out,i+1,j);
out[j]=a[i];
subsequences(a,out,i+1,j+1);

}
int main() {

int n;
cin>>n;
while(n--){
cin.get();
char a[1000];
char out[1000];
cin.getline(a,1000);
subsequences(a,out,0,0);

}

return 0;

}

@kumarakash121005 ur code gives errors and 1 advice i give to u try to use strings better for u

@kumarakash121005 see u have to sort that output array also print in main function

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.