Using the dictionary of four letter words write a program


Using the dictionary of four letter words write a program that will check a sequence of 4 characters entered from the keyboard to determine if it is a word.

Your program should have a function that employs a binary search to look for the word. All words must first be read from the file and stored into an array.

There are 4030 words in the dictionary. Your output should indicate whether the word is valid or not. Count the number of comparisons and print that to the screen along with the validity of the word.

The txt file looks something like this : aahs aals abas abba abbe abed abet able ably abos abri abut abye abys aced aces ache achy acid acme acne acre acta acts acyl adds adit ados adze aeon aero aery afar agar agas aged agee ager ages agha agin agio agly agma agog agon ague ahed ahem ahis ahoy aide aids ails aims ains airn airs airt airy aits ajar ajee akee akin alae alan alar alas alba... and so on

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Using the dictionary of four letter words write a program
Reference No:- TGS01522171

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)