Question: You are creating a program that opens and reads a file. Your program opens a file that a filename is entered by a user. In

You are creating a program that opens and reads aYou are creating a program that opens and reads a

You are creating a program that opens and reads a file. Your program opens a file that a filename is entered by a user. In addition your program prompts a user for a word to search for in the file. If the filename does not exist then an error message: "File does not exist" displays. Once a correct filename is entered your program will read the file and find the number of occurrences of the word entered by the user. Write a program that: Prompts a user to enter an input file name. Prompts a user to enter a word to search for. Errors off when the wrong file name is entered. Opens a file when the correct name is entered. Reads each line of the file. Format file information

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 General Management Questions!