Question: Make a C program that will have two functions. Your first function will ask the user to enter a sentence. This sentence will have the

Make a C program that will have two functions. Your first function will ask the user to enter a sentence. This sentence will have the number of ys in it counted by your second function. You must count both capital and non-capital ys (and remember that in C the small y and the big Y are two different characters). Your second function will then return the number of ys to your first function. Your first function will then print the sentence back to the user along with the number of ys that were found in the sentence.

Output Example:

Create a sentence:

You checked everywhere yet you could not find your plush toy.

Sentence user entered:

You checked everywhere yet you could not find your plush toy.

The number of ys in this sentence is 6

You cannot use fgets (use scanf). Try using a one-dimensional array for this question.

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!