HW5: Write a function to count number of words in a text file named "story.txt".

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.3: Random File Access
Problem 6E
icon
Related questions
Question
HW5: Write a function to count number of words in a text file named "story.txt".
HW6: Write a C++ program to print the count of word (the) as a separate word in a
file named transcript.txt. For example, if the content of the file transcript.txt is:
There was a monkey in the zoo. The monkey was very naughty. Then the output of
the program should be 2
HW7: Assume that you have a text file nắmed filel.dat contains some text written
into it, write a function named vowelwords(), that reads the file filel.dat and creates
a new file named file2.dat, to contain only those words from the file filel.dat which
start with a lowercase vowel (i.e., with 'a', 'e', 'T', 'b', 'u').
getline() function to read the line from a file.
Transcribed Image Text:HW5: Write a function to count number of words in a text file named "story.txt". HW6: Write a C++ program to print the count of word (the) as a separate word in a file named transcript.txt. For example, if the content of the file transcript.txt is: There was a monkey in the zoo. The monkey was very naughty. Then the output of the program should be 2 HW7: Assume that you have a text file nắmed filel.dat contains some text written into it, write a function named vowelwords(), that reads the file filel.dat and creates a new file named file2.dat, to contain only those words from the file filel.dat which start with a lowercase vowel (i.e., with 'a', 'e', 'T', 'b', 'u'). getline() function to read the line from a file.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning