Write a C-language program that will satisfy the following: The program can read a text file named input.txt. This file contains the text of a news article consisting of at least 100 words. The program asks the user to input a word. The program reads the contents of the text file and counts how many times the inputted word appears. The program also determines how sentences there are in the file. Assume that every sentence is terminated by a period. the main() function should only contain variable declarations and functions calls. This means that you have to implement program functionality using user-defined functions.

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.5: A Case Study: Pollen Count File Update
Problem 3E
icon
Related questions
Question

Write a C-language program that will satisfy the following:

  1. The program can read a text file named input.txt. This file contains the text of a news article consisting of at least 100 words.
  2. The program asks the user to input a word.
  3. The program reads the contents of the text file and counts how many times the inputted word appears. The program also determines how sentences there are in the file. Assume that every sentence is terminated by a period.
  4. the main() function should only contain variable declarations and functions calls. This means that you have to implement program functionality using user-defined functions.
Expert Solution
steps

Step by step

Solved in 5 steps with 2 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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT