Question: Please write the code in C, Thank you! 1) Counting words and characters (50 points) Write a C program, count.c, which counts the number of
Please write the code in C, Thank you!

1) Counting words and characters (50 points) Write a C program, count.c, which counts the number of words, characters, and frequency of each character in the user provided sentence. Your program must: Ask user to enter a sentence (accept input until user hits "enter"). Assume that the sentence is no longer than 200 characters. Count the number of words, assume that words are separated by a single space character. Count the number of characters and also the frequency of each character (including spaces and special characters). Do not display count for characters that don't exist in the user input. 1. 2. 3. Example executions: $ 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 1 Your sentence has 1 $ ./count Enter a sentence: I am in class! Your sentence has 4 word(s) Your sentence has 14 character (s) Your sentence has 3 Your sentence has 1! Your sentence has 1 I Your sentence has 2 a Your sentence has 1 c Your sentence has1 i Your sentence has 11 Your sentence has 1 m Your sentence has 1 n Your sentence has 2 s
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
