Recursion-codes of the strings

please correct my code

include

using namespace std;

void gs(char *in,char *out,int i,int j){
//base case
if(in[i]==’\0’){
out[j]=’\0’;
cout<<out<<", ";
return;
}

//recursive case
int fd = in[i]-'0';
//map the numbers corresponding to the Letters
char ch = 'a' + fd -1;
out[j]=ch;
gs(in,out,i+1,j+1);

// take the two digit numbers
if(in[i+1]!='\0'){
    int sd = in[i+1]-'0';
    int no = 10*fd + sd;
    ch = 'a'+no-1;
    out[j]=ch;
    gs(in,out,i+2,j+1);
}

}

int main(){
char in[100];
char out[100];

cin>>in;
cout<<"[";
gs(in,out,0,0);
cout<<"]";

return 0;

}

hi @abhinavssr2003_eab0717682969e5c, updated

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.