c program where the user enters a list of letter (ignoring lowercase and upper c
ID: 3617575 • Letter: C
Question
c program where the user enters a list of letter (ignoring lowercase and upper case, 'a' is the same as 'A') and the programreturns the number of occurences of that letter. for example, ifthe user types in GaaAAbbssaBgggGG the program returnsa = 5
b = 3
s = 2
g = 6
the next part of the program we have to sort the letters by themost frequently occuring to the least frequently occuring. which,in this case, would give us:
gabs
for the sorting we have to use the following functiondeclaration:
void sort(int frequency[], char letters[], int left, intright);
Explanation / Answer
please rate - thanks with quicksort #include #include #define MAX 100 void sort(int[] , char[], int , int); int main() {char a[MAX]; char b[MAX],c; int bcount=0,i=0,j,done,count; int frequency[MAX],k=-1; char letters[MAX]; printf("Enter a srtring of characters: "); scanf("%s",&a); for(j=0;jRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.