Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

What is ex parte communication and why is it not allowed?

Answered: 1 week ago