Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Name this program count.c-The program takes the name of an input file as its single command line argument and uses a function to count the

image text in transcribed

Name this program count.c-The program takes the name of an input file as its single command line argument and uses a function to count the number of upper-case letters, lower-case letters, and digits found in each string within the file. The main 2. program is shown below. You must write the function counts. This function is passed a string and returns the number of uppercase letters, lowercase letters, and digits through the second, third, and fourth parameters. The file DATA Alabama ./a. out DATA Alabama has 1 uppercase, 6 lowercase, and 0 digits has 4 uppercase, 4 lowercase, and 4 digits 1234crimABCD #%$@#$ has 0 uppercase , 0 lowercase, and 0 digits #8$@#$ | #include #include #include void counts (char *, int *, int *, int ) int main (int arge, char *argvl) ( FILE *fp = fopen (argv [1], char str [100]; fscanf(fp, "%s", str); while feof (fp) "r"); int upper, lower, digit; counts (str, upper, &lower, &digit); printf("%s has %d uppercase, %d lowercase, and %d digits ", str, upper, lower, digit) str); fscanf (fp, "%s", return 0

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

Database Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions

Question

=+2 What is the break-even point in units for 2014?

Answered: 1 week ago

Question

What has been your desire for leadership in CVS Health?

Answered: 1 week ago

Question

Question 5) Let n = N and Y Answered: 1 week ago

Answered: 1 week ago

Question

3. Define the attributions we use to explain behavior

Answered: 1 week ago