Question: C language,,, Please help me with the 1-D array with Functions .. DO NOT USE FLOAT Task # 3: Write a logical function sorted inc
Task # 3: Write a logical function sorted inc that receives an array of int values and n representing the number of values. The function will return 1 if the array values are sorted in increasing order, 0 otherwise The array is sorted in increasing order if a[0] a] Sa[2].. Sa[n-1] Write another version of selection_sort; selection_sort dec so that it sorts the array in decreasing order You need to change the type of the array and variable temp from double to int in the definition of selection_sort to accommodate the question here Write a program that reads the size n of an array. Then, will generate n random integer values from1 to 100 to be stored in the array. print the array on the screen. Check if it is by chance sorted in increasing order by using the functions sorted inc. If the array is not sorted (this is what is expected since the values are random), sort the array by using the original and modified selection sort functions i.e. increasing and decreasing. Print your array after each sorting. Sample rurn Enter the array size: 1e Initial array 2 68 35 1 70 25 79 59 63 65 he array is not sorted in increasing order ted array in increasing order 25 35 42 59 63 65 68 70 79 ted array in decreasing order 9 70 68 65 63 59 42 35 25 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
