(Count occurrences ofeach letter in a string) Rewrite the count function in Programming Exercise using the following header:
int* count(const string& s)
This function returns the counts as an array of 26 elements. For example, after invoking
int counts[] = count("ABcaB")counts[0] is 2 , counts[1] is 2 , and counts[2] is 1.
Write a test program that reads a string, invokes the count function, and displays the counts. Sample runs of the program are the same as in Programming Exercise.
Programming Exercise. (Count occurrences of each letter in a string) Rewrite the count function in Programming Exercise using the string class as follows:
void count(const string& s, int counts[], int size)
where size is the size of the counts array. In this case, it is 26. Letters are not case-sensitive, i.e., letter A and a are counted the same as a.
Write a test program that reads a string, invokes the count function, and displays the counts. Sample runs of the program are the same as in Programming Exercise.
Programming Exercise. (Count occurrence of each letter in a string) Write a function that counts the occurrence of each letter in the string using the following header:
void count(const char s[], int counts[]
where counts is an array of 26 integers. counts[0] , counts[1] ,... , and counts[25] count the occurrence of a , b ,... , and z , respectively. Letters are not case-sensitive, i.e., letter A and a are counted the same as a.
Write a test program that reads a string, invokes the count function, and displays the non-zero counts. Here is a sample run of the program:

We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.