How to count in this code

#include<bits/stdc++.h>
using namespace std;

string key[]={"",“abc”,“def”,“ghi”,“jkl”,“mno”,“pqrs”,“tuv”,“wx”,“yz”};

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

int main() {
char in[100],out[100];
cin>>in;
keypad(in,out,0,0);
return 0;
}

Hello @dhruvj797,

I have updated your code

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.