Question: Write a C program, , which counts the number of words, characters, and frequency of each character in the user provided sentence.Your program must: 1.Ask

Write a

C program,

, which counts the number of words, characters, and frequency of

each character in the user provided sentence.Your program must:

1.Ask user to enter a sentence (accept input until user hits enter). Assume that the sentence is no longer than 200 characters.

2.Count the number of words, assume that words are separated by a single space character

3.Count the number of characters and also the frequency of each character(including spaces and special characters) Do not display count for characters that dont exist in the

user input.

Example execution

s:

$ gcc -Wall

-o count count.c

$ ./count

Enter a sentence: Hello

Your sentence has 1 word(s)

Your sentence has 5 character(s)

Your sentence has 1 H

Your sentence has 1 e

Your sentence has 2 l

Your sentence has 1 o

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!