C program for auto complete in the console from the pre-defined word list