Question: Write the following C function: int ascending(int * middle int * last) Which returns whether an integer array is sorted or not (in ascending order).

Write the following C function: int ascending(int * middle int * last) Which returns whether an integer array is sorted or not (in ascending order). Assume that the length of the array is always odd; middle is a pointer pointing to the middle element and last is a pointer pointing to the last element of the array. If the array is sorted in ascending order the function will return l: otherwise it will return 0. b) Write the main function (declare an integer array A consisting of 11 positive integers), which using the above function will print the following: A is/is not sorted in ascending order. The first half of A is/is not sorted in ascending order. The second half of A is/is not sorted in ascending order. It should correctly print whether the arrays and subarrays are sorted or not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
