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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started