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

Write a program that inputs 9 characters from the user and storethem in an array

ID: 3614348 • Letter: W

Question

Write a program that inputs 9 characters from the user and storethem in an array. Then search in this array for a key characterentered by the user, if the character is found, the program shouldspecify the index of the element in the array. Use the followingmodel:

a.    The main() function enters the 9 charactersand stores them in the array, prompt the user for the keycharacter, and calls the search() method to search for thecharacter. It also prints the search result to the user.

b.    The search() function receives the array,the size of the array, and the key character to search for asparameters and searches for the key. It returns the index of thefound character or -1 if not found.

Explanation / Answer

#include int search(int array[], int size, int n) {    int i=0, ret = -1;    for(i=0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote