Question: C++ Write a C program to read a text file containing a list of vocabulary words in alphabetical order. Your instructor will supply the word
C++
Write a C program to read a text file containing a list of vocabulary words in alphabetical order. Your instructor will supply the word (text) file. The program should access the word list file and compute and display the following statistics:
a) total number of words are in the file (over 100,000 words)
b) # words begin with the letter 't'
c) # of words that have no vowels (a, e,i, o, u, y) Note: include y
d) average length of the words (use length() command)
e) minimum length of the words (shortest word length; display length and the shortest word)
f) maximum length of the words (longest word length; display length and the longest word)
h) # of words with all vowels (only vowels; a,e,i,o,u). May contain one or more vowels.
i) # of words that begin with sh
Notes:
1) The words.txt is a pure text (ASCII) file.
2) There are no definitions in the file, just words
3) There is one word per line in the file
4) There are 109,582 words in the file
5) The file size is over 1MB
6) Do not print out the file
7) The file can be opened in NotePad
8) Download this file from Canvas
9) Since I can't send the .txt file, if possible, make a .txt file with the sample text:
a aah aahed aahing aahs aardvark aardvarks aardwolf ab
Total number of words in this sample is 9.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
