What is wrong with this code?

#include

using namespace std;

char stringtable[100][100] = { " ", “.+@$”, “abc”, “def”, “ghi”, “jkl” , “mno”, “pqrs” , “tuv”, “wxyz” };

void character(char * inp , char *out, int i, int j){

if(inp[i]='\0'){

    out[j]='\0';

    cout<< out <<endl;

    return;

}

int digit= inp[i]-'0';

if(digit==0){

    character(inp,out,i+1,j);

}

for(int k=0;stringtable[digit][k]!='\0';k++)

{

    out[j]=stringtable[digit][k];

    character(inp,out,i+1,j+1);

}

}

int main(){

char inp[1000];

char out[1000];

cin>>inp;

character(inp,out,0,0);

}

hello @gargprachi1203
remove this if statement and it will work . ( u have to use space for digit 0 but in ur current code u r skiping it )

It’s not working for any number even after removing the condition

pls share ur code using cb ide , i will check

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.