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

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!