Write a C program to interchange smallest and largest element in the array with following function need to define as voi
Posted: Sun Jul 03, 2022 9:58 am
Write a C program to interchange smallest and largest element in the array with following function need to define as void read_array(int array[], int); //function to take array element from user void display_array(int array[], int); // function to print array element void interchange(int arr[], int); // function to interchange smallest and largest element int find_biggest_pos(int array[], int n); // function to find index of largest element int find_smallest_pos(int array[], int n); // function to find index of smallest element Sample output Enter the size of the array: 5 arr [0] = 2 arr [1] = 6 arr [2] = 7 arr [3] - 3 arr [4] - 1 Modified array is: arr [0] => 2 arr [1] - 6 arr [2] - 1 arr[3] => 3 arr (4) - 7 Program finished with exit code ( Preas ENTER to exit console.