Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are responsible for writing an extension for the MS Word application, which is responsible for counting the lowercase letters, uppercase letters and digits in
You are responsible for writing an extension for the MS Word application, which is responsible for counting the lowercase letters, uppercase letters and digits in a given text, and reporting these numbers to the user. Given below is the program implementing that extension. Fill in the spaces. Do not use ctype.h library. Hint: In ASCII, each char corresponds to a number. The digit characters 'O' through '9; the uppercase characters 'A' through 'Z', and the lowercase letters 'a' through 'Z' are consecutive. int main() { char text[100]: intc, i=0, lowerCount=0, upperCount=0, digitCount=0; printf("enter text: "); gets(text); while (text[i] != '\0') { = (int) text[i]; Il check if text[i] is lowercase (3 pts) lowerCount++; else if ( ...... ) // check if text[i] is uppercase (3 pts) ......; // update the correct counter (2 pts) else if ( ...... ) // check if text[i] is a number (3 pts) digitCount++; // update the correct counter (2 pts) Il complete (3 pts) } printf( ......... ); // report the 3 counters to the user (4 pts)
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