Question: Hello, I am trying to complete exercise 5.8: and this is the code I have so far, but have gotten stuck here. We need to

Hello, I am trying to complete exercise 5.8:

Hello, I am trying to complete exercise 5.8: and this is the

and this is the code I have so far, but have gotten stuck here. We need to use argc and argv for this assignment.

#include #include int main(int argc, char**argv){ char str[] = argv; int acount = 0; int ecount = 0; int icount = 0; int ocount = 0; int ucount = 0; while(str!="EOF"){ if(str=="a"|| str=="A") acount++; if(str=="e"|| str=="E") ecount++; if(str=="i"|| str=="I") icount++; if(str=="o"|| str=="O") ocount++; if(str=="u"|| str=="U") ucount++; } printf("The A/a count is %d ",acount); printf("The E/e count is %d ",ecount); printf("The I/i count is %d ",icount); printf("The O/o count is %d ",ocount); printf("The U/u count is %d ",ucount); return 0; }

The language is C. Thank you!

Exercise 5.8. Write a program according to the following specification: (1) It reads an arbitrary list of strings from stdin. (2) It records the number of vowels encountered. (3) It prints the number of occurrences of each vowel to stdout

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!