Question
C Program This program repeatedly reads strings from standard input, halting when endof-file is reached. For each string, it calls a function, countCase, that takes
C Program
This program repeatedly reads strings from standard input, halting when endof-file is reached. For each string, it calls a function, countCase, that takes the string and counts the number of upper-case and lower-case characters in the string, returning a count of upper-case and lower-case characters through the last two parameters. Your main routine should then print the number of uppercase and lowercase characters in that string. The function signature for countCase is shown below:
void countCase(char *, int *, int *);
A sample execution is shown below.
User Input: Alabama CRImSON TidE UA
Program Output:
Alabama: 1 uppercase, 6 lowercase
CRImSON: 6 uppercase, 1 lowercase
TidE: 2 uppercase, 2 lowercase
UA: 2 uppercase, 0 lowercase 2.
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