Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

B. The problem to be solved Write a C program to perform a menu driven program to display the following: 1. Display Content of a

B. The problem to be solved

Write a C program to perform a menu driven program to display the following:

1. Display Content of a file

2. Count Words

3. Count Characters

4. Exit

When 1 is chosen (Your program will read a text file and display it contents on screen. Your program should ask the file name from user. Note: You are not allowed to use Linux command to display the content of a file)

1. Display Content of a file

2. Count Words

3. Count Characters

4. Exit

Option: 1

Enter file name: file1.txt

The coronavirus (COVID-19) is currently affecting more than 150 countries worldwide and confining nearly 1 billion people to their homes, at the time of writing. During this difficult time, it is important that we support one another with additional love and understanding.

We cannot thank the essential services workforce enough for their sacrifice in the battle against COVID-19, but we can show them our appreciation by simply staying at home. After all, they stayed at work for us, so we SHOULD stay at home for them!

Staying at home may be difficult and frustrating, but there are things that you can do to make it easier

When 2 is chosen (Your program will display total words of your text file)

1. Display Content of a file

2. Count Words

3. Count Characters

4. Exit

Option: 2

No of words: 106

When 3 is chosen (Your program will display total characters of your text file)

1. Display Content of a file

2. Count Words

3. Count Characters

4. Exit

Option: 3

No of characters (including spaces): 624

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 Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago

Question

Know the three main dimensions of the service environment.

Answered: 1 week ago