Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In, C PROGRAMMING: Please help me with the second part of the program in the exa

ID: 3790596 • Letter: I

Question

In, C PROGRAMMING: Please help me with the second part of the program in the example picture attached. I cannot figure out how to write a program that makes the occurrences generate multiple characters if they are occuring in a file more than once?

This program takes the input from a source and uses arrays to output the amount of occurrences in Blue

This program reads from standard input until end-of-file. Once it hits end-of-file, it tells the user what characters it saw, ordered from the most-occurring character down to the characters that it did not see. As an example, if the user entered the input below (shown in red), the program generates the output shown in blue. The Quick Brown Fox Jumps over the Lazy Old Dog 123456789012345 the quick brown fox jumps over the lazy old dog 105 characters lower case 67 and uppercase 9 and digit 15 and special 14 Characters occurring 8 times o Characters occurring 6 times e Characters occurring 4 times h r u Characters occurring 3 times d l t Characters occurring 2 times a c g i k m n p s v w x y z O 1 2 3 4 5 Characters occurring 1 times b f j q B D F J L Q T 0 6 7 8 9 C 1 Characters not found in the input A CE G H I K M N P R S U v W x Y Z S &

Explanation / Answer

i will provide a general solution, hopw this will help you to proceed futhur

int main()

{

   char string[100];

   int c, count[26] = {0};

   printf("your input string ");

   gets(string);

   find_frequency(string, count);//this is the function

   printf("Count of characters ");

   for (c = 0 ; c < 26 ; c++)

printf("%c %d ", c + 'a', count[c]);

   return 0;

}

void find_frequency(char s[], int count[]) {

   int c = 0;

   while (s[c] != '') {

if (s[c] >= 'a' && s[c] <= 'z' )

   count[s[c]-'a']++;

c++;

   }

}