Recursion - Phone Keypad

How Recursion is Working Inside a For Loop?just like in this question?
for(int k=0;k[digit][k]!=’\0’;k++){
out[j]=keypad[digit][k];
printKeypadString(in,out,i+1,j+1);
}
that it discribe in the video

In the code, you have taken a 2-d array of characters, like,
char keypad[][10]={“abc”,“def”,“ghi”,“jkl”,“mno”,“pqrs”,“tuv”,“wx”,“yz”};
and also two characters array , one as input , and other as output,
and the function call that you have used is suppose,
print(input,output,0,0);

Then, when you are writing
for(int k=0;keypad[digit][k]!=’\0’;k++)
It means that suppose your input is 12, then the loop here represents that you are taking
int digit=input[i]-‘0’;, which means you are taking 1 digit at a time, initially it is “1” in “12”, then digit=1
so the loop will run from k=0 uptil keypad[1][k]!=’\0’; which represents "def "
so output[j]=keypad[1][0]
then again you will move to next pointer of both i as well as j… try to dry run the code,… you will understand wht I am trying to say…

Since you arent replying anything, I am marking this doubt as resolved… You can reopen it if u still face any issues……