Question: C++ (Linux) code: Write a function that will take a string and return a count of each letter in the string. For example, my dog
C++ (Linux) code:

Write a function that will take a string and return a count of each letter in the string. For example, "my dog ate my homework" contains 3 m's, 3 o's, 2 e's, 2 y's and one each of d, g, a, t, h, w, r and k. Your function should take a single string argument and return a dynamically allocated array of 26 integers representing the count of each of the letters a.. z respectively. Your function should be case insensitive, i.e., count 'A' and 'a' as the occurrence of the letter a. Do not count non-letter characters (i.e., spaces, punctuation, digits, etc.) Write a program that will solicit a string from the user using getline, call your letter frequency function and print out the frequency of each letter in the string. Do not list letters that do not occur at least once
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
