Question: 2. Write a program that computes the amount of underscores and exclamation points in an input sentence. Here are the rest of the directions: Mike

2. Write a program that computes the amount of underscores and exclamation points in an input sentence.
Here are the rest of the directions:
 2. Write a program that computes the amount of underscores and

Mike likes to use _(underscores) and ! (exclamation points) in his written communications. Write a program characters.c that computes the number of underscores and exclamation points in an input sentence. The program should include the following function. Do not modify the function prototype 2. void count (int* num_, int num_exclamation) The count function asks the user to enter a sentence. Use getchar() function (getchar() is covered in chapter 7) to read in the input. The user input ends with the user pressing the enter key (a new line character). The count function takes two parameters of int *. The num parameter points to a variable in which the function will store the number of underscores. The num_exclamation parameter points to a variable in which the function will store the number of exclamation point. The main function calls the count function. It should also contain the printf statements that display the result. Example input/output: Enter a sentence Hi there!!! Output: There are 2 underscores and 3 exclamation points in the sentence

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!