Please do some reading yourself regarding <ctype.h> library function. There are some function which can check the input type for you i.e. decimal number, float , character etc.
Second option, write a function yourself that check each input from buffer, which get input from standard input device like keyboard.
There are other ways to do this as well, for example checking ASCII code for the input enter from keyboard .. etc.. this is a common and popular problem in C. check it out