You can do it using a 2D array.Obviously there would be more words in a dictionary but I'll just do for one: #include<stdio.h> #include<string.h> main() { char A[100][100],B[15]; int c; strcpy(A,"Hardware-Physical and tangible components of a computer"); //You will have to do for all those words in dictionary printf("Enter the meaning of the word to be found \n"); scanf("%s",B); c=strlen(B);//Finding the length of the word whose meaning is to be found for(i=0;i<100;i++) //Assume that you have stored 100 words out of which hardware is one { if(strncmp(B,A,c)==0)//comparing the words printf("%s ",A); } } note:strncmp() is used to compare the first n letters of a string.when we count the letters in a hardware using strlen(), it comes upto 8. So the first eight letters of the main character array where you store all the words along with their meaning are checked. If it matches , the meaning is displayed. There's no function called strncmpi to ignore the case(lower or upper) , you can't use it like strcmpi-so notify the user to enter the word with the first letter alone in upper case(for this particular program code). It depends on how you initialise the main array in the beginning!!! Hope this was useful!!!