Question: C ++ PROGRAMMING, Please Answer All. Part 1 a) Create an int array to store 10 values. Write a simple loop to initialize the array
C ++ PROGRAMMING, Please Answer All.
Part 1
a) Create an int array to store 10 values. Write a simple loop to initialize the array elements with the values 2, 4, ... 20 Write another loop to print all the elements of the array in reverse. b) Create a char array to store 26 values. Write a simple loop to initialize the array elements with the values a, b, c ... z Write another loop to print all the vowels and the index where each is stored. e.g.: a at index 0 c) Implement a function named avg that takes an int array and its length as parameters and returns the average of the values in the array. Call the function with a sample array and print the average value. d) Implement a function named min_max that takes an int array, its length, and two int parameters min and max. The function sets min to the min value in the array and max to the max value in the array. The function returns nothing. Call the function and print the min and max values found.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
