Question: Character IO Write a program that asks a user for an input file name, and also a vowel. The program reads text from the input

 Character IO Write a program that asks a user for an

Character IO Write a program that asks a user for an input file name, and also a vowel. The program reads text from the input file specified by the user. For each line it displays how many appears in the file when all the data is read. total number of times the vowel appears in the file when all the dinei st alodisplays the total number of timesthe vowel. Your program should define a function called 'readInput' that has two parameters. The first parameter is an input-file stream, and the second parameter is of type character. This function reads from the input-file stream, and displays the number of times the second parameter (the requested vowel) appears on each line. It also displays the total number of times the second parameter appears in the file. The main function prompts for and reads in the input file name and a vowel. It opens the file, and then calls 'readInput' with the input-file stream and the vowel as its arguments. Include a loop in the program that lets the user repeat the above process for as many times as she/he wishes to do so. Now modify the program so that it writes the output both on the screen and also into a file named 'lab80.txt Sample Input and Output Programmer: Name of the programmer (your name) Course: COSC 246, Winter 2018 Lab# Due Date: 3-29-18 Enter an input file name: lab8A.txt Enter a vowel: E Number of E (or e) on each line: 1- 0 2- 3 3- 2 4- 0 5- 3 Total number of E (or e):8 Do it again? Y or y (for yes), and N or n (for no): Y Enter an input file name: lab8A.txt Enter a vowel: a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!