Question: 1. Store the words in a character array. 2. Sort the array 3. Print the sorted array for the user to see what words

1. Store the words in a character array. 2. Sort the array 3. Print the sorted array for the user to see what words are available. 4. Then prompt the user for a word to find in the array (Hint: Always test with the first and last words in the array!) 5. Search the array using a sequential search (count the number of compares to determine if the word was in the array or not... test both ways) 6. Report the number of compares it took to find the word or decide the word was not in the array. 7. Then search the array using a binary search for the same word. (count the number of compares to determine if the word was in the array or not...test both ways) 8. Report the number of compares it took to find the word or decide the word was not in the array. 9. Loop back and ask the user for another word. 10. If the user enters "quit", then exit the program. Otherwise, do it again with a new word from the user.
Step by Step Solution
3.30 Rating (153 Votes )
There are 3 Steps involved in it
Answer 1 General guidance The answer provided below has been developed in a clear step by step manne... View full answer
Get step-by-step solutions from verified subject matter experts
