Question: Write a word search program that searches an input data file for a word specified by the user. The program should display the number of

Write a word search program that searches an input data file for a word specified by the user. The program should display the number of times the word appears in the input data file. In addition, the program should count and display the number of characters in the input data file that are not vowels. Your program must do this by providing the following functions :

void processFile(ifstream inFile, string &word, int &wordCount, int &nonVowelCount) ;

void displayResult(string word, int wordCount, int nonVowelCount) ;

Both functions should be called from main(). No non-constant global variables should be used.

Test your program using the file provided “paragraph.dat”. (name the file paragraph.dat)

Step by Step Solution

3.38 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To tackle this problem we can build the word search program stepbystep as follows Step 1 Define the Required Functions We need to define two main func... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

60961cd46a84e_26617.pdf

180 KBs PDF File

Word file Icon

60961cd46a84e_26617.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!