i is int. you printf() %c. this is wrong, you need to printf() %d and what is the goto for, infinite loop?