simple solution to your problem is :(input doesn’t contain any spaces) take a string variable str[1000] and use scanf("%s",str); now it will store input as characters…
Note: if input has some spaces use :
getchar();
gets(str);
/* getchar() has been used to empty the buffer*/
ENJOY CODING