Also sorry for horrible picture quality Write a program to read integers into an
ID: 3594319 • Letter: A
Question
Also sorry for horrible picture quality Write a program to read integers into an array and then sort the array using selection sort where you find the exchange it wthyxhange it with the first element, and then find the second smallest element an Have your program include four functions, besides main, which perform the following functions: smallest element in the the second element, etc., until the entire array is sorted 1. Read in an undetermined number of array elements 2. Print the array elements (call this function both before and after the elements are sorted) 3. Sort the array elements 4. Swap two elements of an array (this function will be called by your sort function Which of these four functions should have the array passed in as const? Where should the local prototypes of each these functions be places? Use #define to declare the maximum array size as a constant MAXSIZE with a value of 10. Run your program using the following sets of input program using the folo, MAXSE tile() 1. 5 12 -730 2. 1 2 34576 3. Enter more values than the declared array size. Display an appropriate error message and sort the first 10 4. Enter an invalid (nonnumeric) character. Display an appropriate error message and flush the bad data and values anyway. ontinue reading until end-of-file or the array is full Your grade will be based on the correctness and format of your output, as well as the proper use of the following: 1. meaningful variable names 2. indentation 3. blank lines and spacing 4. comments on the following: program description function descriptions - all variable and constant declarations - ambiguous or complex sections of code 5. the correct use of local variables, local prototypes, and parameter passing 6. format and appearance of output 7. structured code (no goto, break, continue, etc, statements) urn in printouts of your program listing and the output. Make sure that your full name is on all of your intouts. Staple the assignment sheet to the top of your program.Explanation / Answer
Please check below corrected programme
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.