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
Memory always contains something. The space used by your variable contains something, and calling strlen() on that just so happens not to blow up somewhere.
Note that the operating system usually reads a full line (and allows editing it), shipping it to the reading application only on ENTER. To handle this is significatly harder than plain reading. Are you sure that it isn't good enough to get a line, check it and complain or go ahead?