Question: Create a program that uses an input file called Myfile.txt and perform the following: a. Create a function called WordsCount that reads your text file

Create a program that uses an input file called Myfile.txt and perform the following:

a. Create a function called WordsCount that reads your text file and returns the number of words in the first line of your program. The number of words must be printed from your main program.

b. Create a function called ReverseOrder that reads the second line of the file and prints the words in that line in reverse order. Example: if the second line reads: In my C++ class I learned Coding , it should output : Coding Learned I class C++ my In. Using an array may help.

Test your program with the following text: Computer science is considered as part of a family of five separate yet interrelated disciplines: computer engineering, computer science, information systems, information technology, and software engineering

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!