Smart keypad 1 doubt

my second test case was failing
i intialised the char out array with 0 then it gave correct answer why??

yatin save ur code to online ide and post here we will figure out the problem

ohh srry i forgot to post code

code—> https://ide.codingblocks.com/s/99072

u did’nt put the null character before printing the out char array
as it can also print garbage