Smart Keypad 1 problem

#include
using namespace std;

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

void printString(char *in,char *out,int i,int j)
{
if(in[i]==’\0’)
{
out[i]=’\0’;
cout<<out<<endl;
return;
}
int digit=in[i]-‘0’;
if(digit==0)
{
printString(in,out,i+1,j);
}
for(int k=0;table[digit][k]!=’\0’;k++)
{
out[j]=table[digit][k];
printString(in,out,i+1,j+1);
}
}

int main()
{
char in[10];
char out[10];
cin>>in;
printString(in,out,0,0);
return 0;
}
One test case is wrong.

Hello Meghna, in your code you have skipped 0 and not considered it.
for input 02 the output should be " a" ," b" , " c" and not “a”, “b”, “c”.