Smart keypad concept

why is the code not working with this condition
if( digit==0)
{
print(in,out,i+1,j);
}
after removing this condition code works fine

hello @shiniagarwal25
because they are considering " " (space ) for digit 0.