Mapped String of Recursion . What is wrong with the code?

#include
using namespace std;

void gen( char *in, char *out, int i, int j){
if(in[j]==’\0’){
out[i] = ‘\0’;
cout<< out<< endl;
return;
}
int digit = in[i]-‘0’;
char ch = digit +‘A’ -1;
out[j] = ch;
gen(in , out, i++,j++);

if(in[i+1]!='\0'){
	int sD= in[i+1]-'0';
	int no= digit*10 +sD;
	if(no<=26){
		ch = no +'A' -1;
		out[j] = ch;
		gen(in ,out, i+2, j+1);
	}
}
return;
}

int main() {
char s[1000000];
cin>>s;
char o[1000000];
gen(s,o,0,0);
return 0;
}

Hey in the submission i saw u got 100%
do u still need some help??

No Maam, i guess i hv not checked it properly, Thanks

u stilll have doubt???

no maam it is clear.

1 Like