This function should create an array of size 50 containing randomly generated letters within the range [1, 25]. The program should write the randomly generated array to an output file named by the user. Determine the maximum and minimum values and the indices of their first occurrence and also the number of times each occurs. Write the values, number of occurrences and indices to the output file. Sort the array in increasing order using a “Bubble Sort” and write the sorted array to the output file.
Must contain, minimally, separate functions to:
Initialize the array - fill the array with random letters
Determine the max, the index of its first occurrence and the number of times it occurs
Determine the min, the index of its first occurrence and the number of times it occurs
Perform the bubble sort on the array
Write the contents of the array with 10 numbers per line (5 lines total)