Question 5: The following program transforms a string by con…
Question 5: The following program transforms a string by converting lowercase letters to uppercase and replacing vowels with ‘#’. It also counts the times the letter ‘g’ appears in a string. Fill in the missing parts to complete the code logic. #include #include int gcounts(char str) { char *p = str; // Question a) while ( ___________ ) { // Question b) if (*p >= ‘a’ && *p max_g) { max_g = g_count; max_index = i; } } if (max_index != -1) { printf(“\nString with the most ‘g’s: %s\n”, courses); printf(“Index: %d, ‘g’ count: %d\n”, max_index, max_g); } return 0; } c) Write conditional statement(s) to replace vowels in string with ‘#’.