Recursion-All subsequences

What is wrong?

#include
using namespace std;

void subsi(char *ip,char *op,int i,int j){
//base case
if(ip[i]==’\0’){
op[j]=’\0’;
cout<<op;
cout<<endl;
return;
}

//recursicve case
subsi(ip,op,i+1,j);
op[j]=ip[i];
subsi(ip,op,i+1,j+1);

}
int main() {
int n;
cin>>n;
char ip[1000];
cin.get();
char op[1000];
while(n>0){
cin.getline(ip,1000);
subsi(ip,op,0,0);
n–;
}
return 0;
}

hi @abhinavssr2003_eab0717682969e5c,
updated https://ide.codingblocks.com/s/664079

please update my code…i didn’t study the vectors

Hi it’s very similar you can read about it to insert you use push back rest use it like array

okay but what was the mistake in my code?>

@abhinavssr2003_eab0717682969e5c no misake just the order of expected output was different in hackerblock

okay…so would you update my code according to the answer??

i already did it check it