Smart keypad challenge

sir, in this question of smart keypad 1 my solution is giving wrong answer for 1st test case. can you plzz tell y?
solution: https://ide.codingblocks.com/s/100330

hey @khushi91200, just increase size of inp and out array too 100.

sir unable to understand you the size of in and out array is already 100 in[100] out[100]

hey @khushi91200, then make a change in line no 13, instead of if(digit==0) make it if(str[digit]==" ").

thanks sir it worked but what is wrong in if(digit==0)

hey @khushi91200, may be digit never becomes zero.