I am trying to \"trap\" keyboard inputs from user, meaning the code will prevent them from entering certain characters, which in this case prevents the input of numbers and spec
May be try
char buffe[30] = {0};
(I have not tried this thouggh)