Question: 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

 Name this program count.c-The program takes the name of an input

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

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!