Answered step by step
Verified Expert Solution
Question
1 Approved Answer
7. (20 points) The built in function toupper() takes a single character and returns the uppercase equivalent. You are to write a function which has
7. (20 points) The built in function toupper() takes a single character and returns the uppercase equivalent. You are to write a function which has a prototype: int CountChar (char s[, char x) s [) is a character string which may be of any length. The function shou return the number of types the character in x (either upper or l occurs in the string s. owercase) For example (this is only an example) the code (put into a properly written program) char al "The Quick Brown Tiger Jumped Over the" char b[l "Really Lazy Zebra" ) char c [ ] = { "Madam, I'm Adam" }; int x,y Z xCountChar (a, t YCountChar (b, z' zCountChar(c, 'M printf("%d %d %din", x, y, z); should print: 3 2 4 Do not write the main program (doing so will cost you points). You should only write the Count Char () function. The function should not have any scanf ), fgets(), or printf () function calls in it. Points will be deducted for using these functions. If you wisheed to write another function which Count Char() calls, that is OK
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