Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this programming quiz, you will implement a program that fills the content of a char array with random characters between a' and 'z' (just
In this programming quiz, you will implement a program that fills the content of a char array with random characters between a' and 'z' (just consider lower case letters of the English alphabet). Then, you will find the character which is appeared mostly in the given char array. In order to do that you have to implement the following functions: void fillArray(unsigned int size, char arr[]) o This function should fill the content of the array arr with random characters between 'a' and 'z. int findChar(unsigned int size, char arr[], char *most) o This function should check the array arr and find the character that is appeared mostly, and write it to the address shown by the pointer most. The function should also return the number of times that the character appeared. o If there are multiple characters that appear mostly, then you can return any of them. Please test your program with the following main function: int main(void) { char arr[50], most; int times=0; fillArray(50, arr); times = findChar(50, arr, &most); printf("The character %c is appeared %d times ", most, times); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started