Boolean function accepts integer single-subscripted array


Question 1) Write a complete C++ program that solves the following problem. Your program must use suitable identifier names, use constants where essential, and include meaningful documentation. Don’t use any global data except for any constant values you may need and your input/output file stream variables.

Write a Boolean function which accepts an integer single-subscripted array of any length. The function must check the values in the array and determine if they are in ascending order. If the array values are sorted in ascending order, the function should return true, otherwise it should return false.

Write a main function that tests your new function. Create two single-subscripted arrays of different lengths. Fill one array with values sorted in ascending order, and one with unsorted values (you may read the data from a file, or simply initialize the array when you declare it). Print the values from each array along with a message indicating whether the array was sorted or not.

Label all of your program outputs, and direct your output to the screen. Include your name and the date at the beginning of your output.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Boolean function accepts integer single-subscripted array
Reference No:- TGS04773

Expected delivery within 24 Hours