Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions