Question: Write a function that takes a string parameter and an integer array parameter. Assume English strings only, so the integer array will have a size

Write a function that takes a string parameter and an integer array parameter. Assume English strings only, so the integer array will have a size of 26(letters in the English alphabet). The function should populate the array with the number of occurrences of each letter in the string. The number of occurrences of letter A should be in the 0 index, B in the 1 index, and so on. The function should be case-insensitive (upper and lower-case letters all count the same). You can do this by changing all letters to upper case (see note below) before counting. 2. Write another function that takes the same parameters: a string parameter and an integer array parameter. This function should print the string and print the count for each letter, produced by the above function. 3. In main(), pass each of the following strings to the count function, then the print function to show the character frequency count of each string. a. "The quick brown fox jumps over the lazy dog" b. "Secret treasure in cave on snake island"

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 Programming Questions!